找不到文件&QUOT

找不到文件&QUOT

本文介绍了"找不到文件"除在建的dexDebug任务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 错误:未能执行任务:应用程序:dexDebug。
> com.android.ide.common.internal.LoggedErrorException:无法运行命令:
    D:\AndroidSDK\adt-bundle-windows-x86_64-20140702\adt-bundle-windows-x86_64-20140702\sdk\build-tools\21.1.2\dx.bat --dex --no-优化 - 输出C:\ Users \用户奇异果奇异果\ AndroidStudioProjects \ MyApplication的\程序\建立\中间体\ DEX \调试--input-list=C:\Users\奇異果Kiwi\AndroidStudioProjects\MyApplication\app\build\intermediates\tmp\dex\debug\inputList.txt
错误code:
    1
输出:
    意外的顶级例外:
    java.lang.RuntimeException的:C:\用户\憟iwi\ AndroidStudioProjects \ MyApplication的\程序\ build中\中间体\类\调试:找不到文件
        在com.android.dex.util.FileUtils.readFile(FileUtils.java:51)
        在com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:169)
        在com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
        在com.android.dx.command.dexer.Main.processOne(Main.java:632)
        在com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
        在com.android.dx.command.dexer.Main.runMonoDex(Main.java:280)
        在com.android.dx.command.dexer.Main.run(Main.java:246)
        在com.android.dx.command.dexer.Main.main(Main.java:215)
        在com.android.dx.command.Main.main(Main.java:106)
    意外的顶级例外:
    java.io.FileNotFoundException: C:\Users\憟?iwi\AndroidStudioProjects\MyApplication\app\build\intermediates\$p$p-dexed\debug\support-annotations-21.0.3-51286ab94e7499c7ecd0aa476d97b899efaf6c27.jar (系统找不到指定的路径。)
        在java.util.zip.ZipFile.open(本机方法)
        在java.util.zip.ZipFile中的< INIT>(ZipFile.java:214)
        在java.util.zip.ZipFile中的< INIT>(ZipFile.java:144)
        在java.util.zip.ZipFile中的< INIT>(ZipFile.java:158)
        在com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:244)
        在com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
        在com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
        在com.android.dx.command.dexer.Main.processOne(Main.java:632)
        在com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
        在com.android.dx.command.dexer.Main.runMonoDex(Main.java:280)
        在com.android.dx.command.dexer.Main.run(Main.java:246)
        在com.android.dx.command.dexer.Main.main(Main.java:215)
        在com.android.dx.command.Main.main(Main.java:106)
    意外的顶级例外:
    java.io.FileNotFoundException: C:\Users\憟?iwi\AndroidStudioProjects\MyApplication\app\build\intermediates\$p$p-dexed\debug\internal_impl-21.0.3-ce55b50963ad65e1327b9400909949150e7611f9.jar (系统找不到指定的路径。)
        在java.util.zip.ZipFile.open(本机方法)
        在java.util.zip.ZipFile中的< INIT>(ZipFile.java:214)
        在java.util.zip.ZipFile中的< INIT>(ZipFile.java:144)
        在java.util.zip.ZipFile中的< INIT>(ZipFile.java:158)
        在com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:244)
        在com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
        在com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
        在com.android.dx.command.dexer.Main.processOne(Main.java:632)
        在com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
        在com.android.dx.command.dexer.Main.runMonoDex(Main.java:280)
        在com.android.dx.command.dexer.Main.run(Main.java:246)
        在com.android.dx.command.dexer.Main.main(Main.java:215)
        在com.android.dx.command.Main.main(Main.java:106)
    意外的顶级例外:
    java.io.FileNotFoundException: C:\Users\憟?iwi\AndroidStudioProjects\MyApplication\app\build\intermediates\$p$p-dexed\debug\classes-d623e62ecbc5d0168d8c16d5b214281abe3a28b1.jar (系统找不到指定的路径。)
        在java.util.zip.ZipFile.open(本机方法)
        在java.util.zip.ZipFile中的< INIT>(ZipFile.java:214)
        在java.util.zip.ZipFile中的< INIT>(ZipFile.java:144)
        在java.util.zip.ZipFile中的< INIT>(ZipFile.java:158)
        在com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:244)
        在com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
        在com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
        在com.android.dx.command.dexer.Main.processOne(Main.java:632)
        在com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
        在com.android.dx.command.dexer.Main.runMonoDex(Main.java:280)
        在com.android.dx.command.dexer.Main.run(Main.java:246)
        在com.android.dx.command.dexer.Main.main(Main.java:215)
        在com.android.dx.command.Main.main(Main.java:106)
    意外的顶级例外:
    java.io.FileNotFoundException: C:\Users\憟?iwi\AndroidStudioProjects\MyApplication\app\build\intermediates\$p$p-dexed\debug\classes-4970dd912b559490f230c1c9ad0babb79d453354.jar (系统找不到指定的路径。)
        在java.util.zip.ZipFile.open(本机方法)
        在java.util.zip.ZipFile中的< INIT>(ZipFile.java:214)
        在java.util.zip.ZipFile中的< INIT>(ZipFile.java:144)
        在java.util.zip.ZipFile中的< INIT>(ZipFile.java:158)
        在com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:244)
        在com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
        在com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
        在com.android.dx.command.dexer.Main.processOne(Main.java:632)
        在com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
        在com.android.dx.command.dexer.Main.runMonoDex(Main.java:280)
        在com.android.dx.command.dexer.Main.run(Main.java:246)
        在com.android.dx.command.dexer.Main.main(Main.java:215)
        在com.android.dx.command.Main.main(Main.java:106)
    5个错误;中止
 

解决方案

尝试找到您的项目不具有在其非ASCII字符的路径;您的用户名是统一code和构建系统无法处理具有非ASCII统一code路径名。

这其实是Java中的一个缺陷,是相当困难的修复;看<一href="https://$c$c.google.com/p/android/issues/detail?id=56102">https://$c$c.google.com/p/android/issues/detail?id=56102了解详细信息。它的关键是,Java的发射器使用了错误的Windows API调用来从操作系统的命令行。

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
解决方案

Try locating your projects in a path that doesn't have non-ASCII characters in it; your username is in Unicode, and the build system can't handle pathnames that have non-ASCII 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 for details. The crux of it is that Java's launcher uses the wrong Windows API call to fetch its command line from the OS.

这篇关于&QUOT;找不到文件&QUOT;除在建的dexDebug任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 07:21