Android的工作室:preDexDebug失败
问题描述:
我得到了一个错误构建Android项目,甚至一个Hello World项目:
I got an error building android project, even a hello world project:
控制台输出:
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:
/Applications/Android Studio.app/sdk/build-tools/19.1.0/dx --dex --output /Users/luyaochen/Documents/and/MyApplication3/app/build/intermediates/pre-dexed/debug/internal_impl-20.0.0-20e875ec0585f022fce03f5b07d31a0222ca3f58.jar /Users/luyaochen/Documents/and/MyApplication3/app/build/intermediates/exploded-aar/com.android.support/support-v4/20.0.0/libs/internal_impl-20.0.0.jar
Error Code:
1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
请帮帮忙,我不知道哪里出了问题。
please help, I don't know what went wrong
答
我有同样的问题,发现,在项目设置JDK指向的位置的Java 8目录。将其更改为Java 7的解决了该问题。
I had the same issue, found out that JDK location in project setting pointed to Java 8 directory. Changing it to Java 7 fixed the issue