简体   繁体   中英

Cannot run any project in Android Studio 0.8.1

I cannot run any project. I created a default project with an acitivity and when i try to run it I get this error.

Error:Execution failed for task ':app:dexDebug'.
    > com.android.ide.common.internal.LoggedErrorException: Failed to run command:
        C:\androidstudio\sdk\build-tools\android-4.4W\dx.bat --dex --num-threads=4 --output C:\projects\app\build\intermediates\dex\debug C:\projects\app\build\intermediates\classes\debug C:\projects\app\build\intermediates\dependency-cache\debug
    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.

any dependency it tries to copy to dex/debug im guessing, but fails to do so. Any ideas?

First of all, you should double check that the path C:\\androidstudio\\sdk\\build-tools\\android-4.4W\\dx.bat does indeed exist. It could be that your SDK configuration is pointing at an invalid directory (though that's unlikely, given how far you're getting in the compilation/build process).

After that, this looks very similar to a similar error on OSX , so you might try the proposed solution there, which is to run gradlew.bat --stop using the Gradle wrapper script that should be in the root of your project and then try to compile again.

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