File not found exception in build dexDebug task

Error:Execution failed for task ':app:dexDebug'. > com.android.ide.common.internal.LoggedErrorException: Failed to run command: D:\AndroidSDK\adt-bundle-windows-x86_64-20140702\adt-bundle-windows-x86_64-20140702\sdk\build-tools\21.1.2\dx.bat --dex --no-optimize --output C:\Users\奇異果Kiwi\AndroidStudioProjects\MyApplication\app\build\intermediates\dex\debug --input-list=C:\Users\奇異果Kiwi\AndroidStudioProjects\MyApplication\app\build\intermediates\tmp\dex\debug\inputList.txt Error Code: 1 Output: UNEXPECTED TOP-LEVEL EXCEPTION: java.lang.RuntimeException: C:\Users\憟?iwi\AndroidStudioProjects\MyApplication\app\build\intermediates\classes\debug: file not found at com.android.dex.util.FileUtils.readFile(FileUtils.java:51) at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:169) 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:280) at com.android.dx.command.dexer.Main.run(Main.java:246) at com.android.dx.command.dexer.Main.main(Main.java:215) at com.android.dx.command.Main.main(Main.java:106) UNEXPECTED TOP-LEVEL EXCEPTION: java.io.FileNotFoundException: C:\Users\憟?iwi\AndroidStudioProjects\MyApplication\app\build\intermediates\pre-dexed\debug\support-annotations-21.0.3-51286ab94e7499c7ecd0aa476d97b899efaf6c27.jar (系統找不到指定的路徑。) at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(ZipFile.java:214) at java.util.zip.ZipFile.<init>(ZipFile.java:144) at java.util.zip.ZipFile.<init>(ZipFile.java:158) 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:280) at com.android.dx.command.dexer.Main.run(Main.java:246) at com.android.dx.command.dexer.Main.main(Main.java:215) at com.android.dx.command.Main.main(Main.java:106) UNEXPECTED TOP-LEVEL EXCEPTION: java.io.FileNotFoundException: C:\Users\憟?iwi\AndroidStudioProjects\MyApplication\app\build\intermediates\pre-dexed\debug\internal_impl-21.0.3-ce55b50963ad65e1327b9400909949150e7611f9.jar (系統找不到指定的路徑。) at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(ZipFile.java:214) at java.util.zip.ZipFile.<init>(ZipFile.java:144) at java.util.zip.ZipFile.<init>(ZipFile.java:158) 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:280) at com.android.dx.command.dexer.Main.run(Main.java:246) at com.android.dx.command.dexer.Main.main(Main.java:215) at com.android.dx.command.Main.main(Main.java:106) UNEXPECTED TOP-LEVEL EXCEPTION: java.io.FileNotFoundException: C:\Users\憟?iwi\AndroidStudioProjects\MyApplication\app\build\intermediates\pre-dexed\debug\classes-d623e62ecbc5d0168d8c16d5b214281abe3a28b1.jar (系統找不到指定的路徑。) at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(ZipFile.java:214) at java.util.zip.ZipFile.<init>(ZipFile.java:144) at java.util.zip.ZipFile.<init>(ZipFile.java:158) 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:280) at com.android.dx.command.dexer.Main.run(Main.java:246) at com.android.dx.command.dexer.Main.main(Main.java:215) at com.android.dx.command.Main.main(Main.java:106) UNEXPECTED TOP-LEVEL EXCEPTION: java.io.FileNotFoundException: C:\Users\憟?iwi\AndroidStudioProjects\MyApplication\app\build\intermediates\pre-dexed\debug\classes-4970dd912b559490f230c1c9ad0babb79d453354.jar (系統找不到指定的路徑。) at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(ZipFile.java:214) at java.util.zip.ZipFile.<init>(ZipFile.java:144) at java.util.zip.ZipFile.<init>(ZipFile.java:158) 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:280) at com.android.dx.command.dexer.Main.run(Main.java:246) at com.android.dx.command.dexer.Main.main(Main.java:215) at com.android.dx.command.Main.main(Main.java:106) 5 errors; aborting 
+6
source share
2 answers

Try to find your projects in a way that does not contain non-ASCII characters in it; your username is in Unicode, and the build system cannot handle the names of paths that have Unicode Unicode.

This is actually a bug in Java and is quite difficult to fix; see https://code.google.com/p/android/issues/detail?id=56102 . Its essence is that the Java launcher uses the wrong Windows API call to extract its command line from the OS.

+5
source

I just solved this same problem 5 minutes ago. As you can see here debug: file not found in Android 1.0 my problem was in the path name. Before upgrading to 1.0, I worked with # Ing.Informatica and / Ingenier ía / AdministradorContraseñas, now I have to work with Ing.Informatica and / Ingenieria / AdministradorContrasennas, because it seems that after updating Android Studio can no longer read special characters.

Hope this helps.

+1
source

Source: https://habr.com/ru/post/979681/


All Articles