I have downloaded and installed jdk 1.8, but when i try to set path to jdk 1.8 in ProjectStructure -> JDK Location, AndroidStudio ignored it, so after set path
click OK and reopen window "ProjectStructure" i see jdk 1.7 again
I deleted folder with java 1.7, and AndroidStudio open me dialog for specifing jdk-path, whehe i set it. Thank everybody for answering!
This seems to be a bug either in Android Studio 2.1.x or IntelliJ. Here is a workaround after you installed the new JDK and set it as JAVA_HOME env variable:
Close Android Studio
Go to %HOME%/.AndroidStudio2.1/config/options (or which version you are using)
rename/delete jdk.table.xml
start Android Studio again -> the JDK set in JAVA_HOME should be set as default jdk
Reference: https://code.google.com/p/android/issues/detail?id=213239
See also: Android Studio JDK location changes back to 1.7 every time it is updated to 1.8 path
Uninstall Java JDK7 and install JDK8, or set JDK8 as default Java VM in your OS.
I think you need to update your path variable and add your jdk location to it . Studio must be automatically getting path from your environment variable and replacing your path .
The JDK 1.8 does not seem to be fully supported by Android Studio because the Android platform does not support Java 8 as it is currently.
You can see this link for more information. Is JDK 1.8 fully supported by Android Studio?
use Android Studio 2.2 preview 7 version this only support java 8
Then you can use java 8 features :)
Just move your sdk folder to the small destination folder like C:/sdk. It seems that without setting your sdk folder you can't change the directory of the jdk folder.
Related
I have faced this error many times and fixed it also. But this time when I updated my android studio to the 2.2.2 and trying to load the project that was made on android studio 2.0 . Its giving me the following error.
and the path of the jdk is as and I have chnged tha following path to my valid jdk path but of no use.
Please tell me what shoudl I do . My studio is running well with all other projects but that project was made on android 2.0 and with other machine in our company.
Please help me I have stucked here for weeks
This error usually means what it says, you are trying to use a JRE instead of a JDK. The C:\Program Files\Android\Android Studio\jre folder is not the folder you should be using, you should be using the directory of a JDK installation (e.g. C:\Program Files\Java\jdk1.8.0_111). You will also need to set the JAVA_HOME environment variable to point at the same directory.
If you don't have a JDK you can download it from http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
I try to programing in visual studio for android.
I install SDK , JDK ,Xamarin .Now I want set path of jdk to the visual studio but vs get message that :
Cannot find Java Development Kit files in specified path:
C:\Program Files\Java\jre1.6.0_07\bin
I set this path for Path and Home_java variable on the Enviroment Variable in SystemAdvanceSetting.
I use where javac in cmd but it can not find java path.
How to fix this?
Xamarin 4.1.2.18 and earlier doesn't currently support a 64-bit JDK. You should install a 32-bit version of JDK 1.7u79, which Xamarin will be able to detect. You can see which JDK Xamarin is using by clicking the Visual Studio menu Tools > Xamarin. You will see the listed JDK and Android SDK directories.
Xamarin.Android 4.1.2.18 and earlier also requires that a 32-bit Java JDK 7 (1.7) be
installed. Later versions of the JDK can also be installed alongside
JDK 7, if required by your machine.
You can use a 64-bit JDK 8 installation with the newer Xamarin 4.2 and later.
Your JDK path must point to C:\Program Files\Java\jre1.6.0_07, not to the bin directory.
Update your JAVA_HOME environment variable and try again.
When I create a new Android project on Visual Studio 2015 on Windows 7 (by Xamarin), I run into this error:
Object reference not set to an instance of an object.
Options->Xamarin->Android Settings are OK: JDK, Android SDK and NDK locations are correctly checked.
I think u haven't Java drive in your computer. U have to download jdk and install or if u r have jdk (Java) enter in google how to set jdk to windows
Its the Xamarin error don't look after that you complete your code and use debug for the code it will run.
AFAIK Android need jdk 1.7, not 1.8
http://developer.android.com/sdk/index.html#Requirements
Had the following error in Eclipse after installing Android 5.0 (SDK 21)
"Loading data for Android 5.0" has encountered a problem.
Parsing Data for android-21 failed
unsupported major.minor version 51.0
Try installing JDK 1.8 and reload Eclipse.
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Initially I was facing the same issue. I upgraded to JDK1.7. Still issue persist. This is due to the fact that some time eclipse takees the default sdk as 1.6. To resolve this:
Change the environmental path to point 1.7/1.8
Open Eclipse and goto windows tab-> preference
Goto Java->complier and set Compiler compliance level to 1.7 and press apply.
Then Goto Installed JRE Section. check if the installed jdk is listed and selected in the list. If not listed give the manual path using search. then select the jdk version and remove other versions in the list.
in installed JRE go to execution environment and select the intended java se version and check it in compatible section
Presss ok and restart Eclipse.
This should resolve the issue.
I tried all above mention step, but not able to solve the problem.
After some research, I got Solution of my problem.
check eclipse.ini to see -vm, (like "C:/Program Files/Java/jre7/bin/javaw.exe").
i also have the problem you said and i found eclipse is started with java6. after i modify to use java7, there are no such fail dialog.
So need to update SDK to 1.8 or 1.7.
set compiler to 1.7 or 1.8..
then check eclipse.ini
Installing JDK 1.8 and reload Eclipse worked for me
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
OS: OSX 10.9.2
build tool: gradle
platform: android
I've recently installed jdk 8 which i use for some side projects. i have 1.6, 1.7 and 1.8 installed at the same time.
The issue that i'm having is when building android projects, in android studio using gradlew its using jdk 8, instead of using the jdk that i've set for the project. This causes issues as one of the gradle plugins i'm using (new relic agent) does not yet support java 8.
I dont know how android studio decides what jdk to use for gradle, but it should use the same as the jdk you set for you project, otherwise what is the point in asking me to set one?
So my question is this. How can i set what jdk to use for gradlew in android studio, or in intellij in general as i'm sure this will affect other projects too