Android studio gradle run the program
erro info:
Error:Execution failed for task ':app:createAnzhiDebugMainDexClassList'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
java -Xmx1024M -cp /Users/Hades/Library/Android/sdk/build-tools/21.1.2/lib/dx.jar com.android.multidex.ClassReferenceListBuilder /Users/Hades/Work/Code/RentAgentNew/RentAgent/app/build/intermediates/multi-dex/anzhi/debug/componentClasses.jar /Users/Hades/Work/Code/RentAgentNew/RentAgent/app/build/intermediates/multi-dex/anzhi/debug/allclasses.jar
Error Code:
1
Output:
Unable to locate a Java Runtime to invoke.
Resolve Method:
you can in the gradle command line input this command:
Mac
./gradlew --stop
Windows
gradle --stop
or
gradlew --stop
It works for me!
No comments:
Post a Comment