简体   繁体   中英

Can't Complete a “Hello World” Build in Android Studio: preDexDebug, can't find path

Two weeks after first installing AS, and I still can't finish a "Hello World" build. This is with me not even doing anything except creating a new project and trying to build. It has something to do with "preDexDebug" failing and "the system cannot find the path specified" and I know there have been numerous posts similar to this but I think I've pretty much seen them all, tried lots of proposed solutions, and I'm still stuck. I have all the latest updates as of 2/5/15: AS 1.0.2, SDK tools 24.0.2, SDK Platform tools Rev. 21, SDK Build-tools 21.1.2., Java 1.8.0_31.

I'm new to Android so please keep this in mind if you have suggestions. Thanks!

Information:Gradle tasks [:app:assembleDebug]
:app:preBuild
:app:compileDebugNdk UP-TO-DATE
:app:preDebugBuild
:app:checkDebugManifest
:app:preReleaseBuild
:app:prepareComAndroidSupportAppcompatV72103Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42103Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:compileDebugJava UP-TO-DATE
:app:preDexDebug
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
Error:Execution failed for task ':app:preDexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run     command:
C:\Users\vinnie\AppData\Local\Android\sdk3\build-tools\21.1.2\dx.bat --dex --output         C:\Users\vinnie\AndroidStudioProjects\Deleteme4\app\build\intermediates\pre-dexed\debug\support-annotations-21.0.3-4e02bd73cb03b945e2cab353d322565f8322cccd.jar C:\Users\vinnie\AppData\Local\Android\sdk3\extras\android\m2repository\com\android\support\support-annotations\21.0.3\support-annotations-21.0.3.jar
Error Code:
    1
Output:
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
Information:BUILD FAILED
Information:Total time: 8.371 secs
Information:1 error
Information:0 warnings
Information:See complete output in console

FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:preDexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
C:\Users\vinnie\AppData\Local\Android\sdk3\build-tools\21.1.2\dx.bat --dex --output C:\Users\vinnie\AndroidStudioProjects\Deleteme4\app\build\intermediates\pre-dexed\debug\support-annotations-21.0.3-4e02bd73cb03b945e2cab353d322565f8322cccd.jar  C:\Users\vinnie\AppData\Local\Android\sdk3\extras\android\m2repository\com\android\support\support-annotations\21.0.3\support-annotations-21.0.3.jar
Error Code:
    1
Output:
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --    debug option to get more log output.

BUILD FAILED

Total time: 8.371 secs

考虑到您是从全新安装中使用AS的,可能是您的防病毒软件阻止了dx.bat文件的执行。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM