运行gradle assembleMyAppDebug
后,我收到以下错误:
:app:transformClassesWithMultidexlistForMyAppDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformClassesWithMultidexlistForMyAppDebug'.
> java.io.FileNotFoundException: /home/jenkins/workspace/my-app/app/build/intermediates/multi-dex/myapp/debug/manifest_keep.txt (No such file or directory)
我找不到可能出现错误的迹象。
gradle --version
的结果:
------------------------------------------------------------
Gradle 3.5
------------------------------------------------------------
Build time: 2017-04-10 13:37:25 UTC
Revision: b762622a185d59ce0cfc9cbc6ab5dd22469e18a6
Groovy: 2.4.10
Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM: 1.8.0_121 (Oracle Corporation 25.121-b13)
OS: Linux 4.9.20-11.31.amzn1.x86_64 amd64
更新:
我尝试在gradle clean
之前运行gradle assembleMyAppDebug
,然后错误更改为:
Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)
作业在Jenkins上的AWS ECS上的Docker容器内运行。
答案 0 :(得分:1)
我尝试了很多不同的配置和解决方案。最后,似乎真正的问题与容器的可用内存和CPU有关。一旦我将这两个参数从1GB更新到3GB内存,从1个CPU更新到2个CPU,它就开始工作了。