java - Android studio jdk and gradle errors -
it's 10 time try install , run android studio have problem! can't work it! want migrate eclipse. solved problem not recognized sdk path, solved problem not recognized device , have 2 propblems!
1)error:gradle version 1.10 required. current version 2.2.1. if using gradle wrapper
2)error:the supplied javahome seems invalid. cannot find java executable. tried location: c:\users\admin\desktop\adt-bundle-windows-x86_64-20140702\sdk\bin\java.exe
and can't solve them. second 1 it's incredible!!! don't have jdk there! set jdk path in project structure , jdk location is:
c:\program files\java\jdk1.7.0_71
anyone can me please?
solution of first is:
you have change line in build.gradle (this gradle plugin android)
classpath 'com.android.tools.build:gradle:1.1.+'
the version of android gradle plugin needs compatible version of gradle.
make sure distributionurl specified gradle-1.10-all.zip @ gradle-wrapper properties file within android project.
this line in gradle-wrapper.properties (this gradle version)
distributionurl=http\://services.gradle.org/distributions/gradle-1.10-all.zip
solution of second is:
- if not have java_home variable environment variables then
set java_home variable
once have jdk installation path:
right-click computer icon on desktop , select properties. click advanced tab. click environment variables button. under system variables, click new. enter variable name java_home. enter variable value installation path java development kit. click ok. click apply changes.
- if have java_home value then
change value of environment variable java_home c:\program files (x86)\java\jre7\ instead of c:\program files (x86)\java\jre7\bin\java.exe
java_home should pointing parent directory of jdk or jre installation inside of which, find bin directory containing java, javac, etc. binaries
Thanks, this was helpful :) it helped me solve a gradle bug i was facing.
ReplyDelete