美文网首页
Execution failed for task ':app:

Execution failed for task ':app:

作者: 不问何处有明月 | 来源:发表于2018-08-04 11:07 被阅读0次

今天在打包时 报错:

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:mergeReleaseResources'.

Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

原因是 资源文件有问题、我的string 文件只有CN 、没做US 适配

懒式解决方法:

aaptOptions.cruncherEnabled = false
aaptOptions.useNewCruncher = false

lintOptions {
    checkReleaseBuilds false
    abortOnError false
}

然后就可以打包了

相关文章

网友评论

      本文标题:Execution failed for task ':app:

      本文链接:https://www.haomeiwen.com/subject/jjopvftx.html