Error:Execution failed for task app怎么解决
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Error:Execution failed for task app怎么解决相关的知识,希望对你有一定的参考价值。
参考技术A 1.报这样的错误,通常是module代码异常,编译不通过,解决办法:检查代码提示错误的地方,点击“Build——>Make module‘app’重新编译”不报错,即可成功运行Error:Execution failed for task ':app:dexRelease'.
Error:Execution failed for task ':app:dexRelease'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
D:\Android sdk\android-sdk\build-tools\21.1.1\dx.bat --dex --output C:\Users\哲友\AndroidStudioProjects\yuezhan\app\build\intermediates\dex\release --input-list=C:\Users\哲友\AndroidStudioProjects\yuezhan\app\build\intermediates\tmp\dex\release\inputList.txt
Error Code:
1
Output:
UNEXPECTED TOP-LEVEL EXCEPTION:
java.io.FileNotFoundException: C:\Users\鍝插弸\AndroidStudioProjects\yuezhan\app\build\intermediates\pre-dexed\release\support-annotations-21.0.2-ae8665bcc547648b6fdb5da61f4e3df97c34d191.jar (系统找不到指定的路径。)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:220)
at java.util.zip.ZipFile.<init>(ZipFile.java:150)
at java.util.zip.ZipFile.<init>(ZipFile.java:164)
at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:244)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:632)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:279)
at com.android.dx.command.dexer.Main.run(Main.java:245)
at com.android.dx.command.dexer.Main.main(Main.java:214)
at com.android.dx.command.Main.main(Main.java:106)
UNEXPECTED TOP-LEVEL EXCEPTION:
求大神解决
dependencies
classpath 'com.squareup.gradle:gradle-android-test-plugin:0.9.1-SNAPSHOT'
修改为: dependencies
classpath 'org.robolectric:robolectric-gradle-plugin:0.11.+'
同时把apply plugin: 'android-test' 修改为apply plugin: 'robolectric'
再运行Gradle clean build,成功。本回答被提问者和网友采纳
以上是关于Error:Execution failed for task app怎么解决的主要内容,如果未能解决你的问题,请参考以下文章
Error:Execution failed for task app怎么解决
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
Error:Execution failed for task ':app:transformClassesWithDexForDebug'解决方法
Error:Execution failed for task ':app:transformClassesWithDexForRelease'
Error:Execution failed for task ':app:processDebugManifest'. 合并冲突
Android异常篇 Error:Execution failed for task ‘:app:validateSigningDebug‘.