资讯专栏INFORMATION COLUMN

ionic打包报错Execution failed for task ':processD

GeekGhc / 1878人阅读

摘要:项目打包运行命令的时候报错报错详情如下解决办法已经执行过命令添加了平台,直接打开目录你的项目工程文件中找到方法在这个方法之前添加上如下内容原因分析带号是指要用最新版本。

ionic项目打包运行命令 ionic build android的时候报错

报错详情如下

:processDebugResourcesERROR: In  FontFamilyFont, unable to find attribute android:fontVariationSettings
ERROR: In  FontFamilyFont, unable to find attribute android:ttcIndex

 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ":processDebugResources".
> com.android.ide.common.process.ProcessException: Failed to execute aapt


BUILD FAILED

Total time: 27.96 secs
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Error: cmd: Command failed with exit code 1 Error output:
ERROR: In  FontFamilyFont, unable to find attribute android:fontVariationSettings
ERROR: In  FontFamilyFont, unable to find attribute android:ttcIndex


FAILURE: Build failed with an exception.

 * What went wrong:
Execution failed for task ":processDebugResources".
> com.android.ide.common.process.ProcessException: Failed to execute aapt

 * Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

解决办法:

已经执行过命令ionic cordova platform add android 添加了android平台,
直接打开目录 你的项目工程/platform/build.gradle文件中
找到def addSigningProps(propsFilePath, signingConfig){...}方法
在这个方法之前添加上如下内容

gradle.taskGraph.whenReady { taskGraph ->
    taskGraph.getAllTasks().each() { task ->
        if (task.name == "validateReleaseSigning" || task.name == "validateSigningRelease") {
            promptForReleaseKeyPassword()
        }
    }
}

def addSigningProps(propsFilePath, signingConfig) {
...
}

原因分析

compile "com.android.support:support-v4:+" 带+号是指要用最新版本。

force "com.android.support:support-v4:27.1.0" 添加force强制指定annotations

文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。

转载请注明本文地址:https://www.ucloud.cn/yun/93414.html

相关文章

  • ionic打包报错Execution failed for task ':compileD

    摘要:添加插件可能会遇到如下报错提示信息如果你在时,有注意到是需要版本大于等于解决方案所以只需要运行命令这样就在运行就能打包成功了 添加ionic插件cordova-plugin-file可能会遇到如下报错 提示信息 :processDebugResources :generateDebugSources :compileDebugJava apache/cordova/filetransf...

    pepperwang 评论0 收藏0
  • ionic打包报错Execution failed for task ':compileD

    摘要:添加插件可能会遇到如下报错提示信息如果你在时,有注意到是需要版本大于等于解决方案所以只需要运行命令这样就在运行就能打包成功了 添加ionic插件cordova-plugin-file可能会遇到如下报错 提示信息 :processDebugResources :generateDebugSources :compileDebugJava apache/cordova/filetransf...

    whidy 评论0 收藏0
  • Error:Execution failed for task ':app:processD

    Attribute meta-data#android.support.VERSION@value value=(26.1.0) from AndroidManifest.xml:28:13-35 is also present at AndroidManifest.xml:28:13-35 value=(26.0.1). Suggestion: add tools:replace=android...

    番茄西红柿 评论0 收藏0
  • Execution failed for task ':app:compileDebugJ

    摘要:注有关详细信息请使用重新编译。个错误原来是的找不到了彻底解决了可以在右侧找到对应的各种快捷键 org.gradle.api.tasks.TaskExecutionException: Execution failed for task :app:compileDebugJavaWithJavac. at org.gradle.api.internal.tasks.executi...

    nicercode 评论0 收藏0
  • [译] Plaid 应用迁移到 AndroidX 的实践经历

    摘要:它是对的重大改进和全面替代方案。一个更直接的方法是开始迁移,并且检查可能出现的报错。迁移工具位于菜单栏的选项。这个选项将迁移整个项目的所有模块。中的迁移工具是迁移的主要方式。迁移应用变更最少的代码以保证应用可以仍能正常运行。 原文地址:Cross-stitching Plaid and AndroidX 原文作者:Tiem Song 译文出自:掘金翻译计划 本文永久链接:github.co...

    番茄西红柿 评论0 收藏0

发表评论

0条评论

最新活动
阅读需要支付1元查看
<