I'm having an issue with Android Studio 1.0.1. I downloaded and installed it on a MacBook running Yosemite 10.10.1. When I tried to make a 'Hello World' application, it complained that it requires JDK7 to compile android-21. I had JDK6 installed. So I upgraded Java, and I figured why not just get the newest version and so I installed JDK8. Then, I uninstalled and reinstalled Android Studio and restarted the computer. When I run java -version, the terminal tells me that I'm running version 8. However, my directory structure still looks like /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/.... Android Studio still doesn't like it and complains that I need JDK7. I tried editing the plist file for Android Studio and changing the JDK to 1.8 from 1.6 and this did not work. That was everything I could find on the internet so far. I was thinking I could uninstall Java and then install JDK7 but I don't have much experience with that as I'm a Linux user and so I'm clueless as to how to do a few things on Mac, like an equivalent of apt-get uninstall java in order to actually try this out. Alternatively, I'm not sure what program to drag to the Trash to uninstall. How can I resolve this?
Have JDK 1.7 installed and make JAVA_HOME variable point to the JDK 1.7 directory then Android Studio will find your JDK 1.7 following your JAVA_HOME variable
Related
I am learning to build an Android app for the first time, and not even able to get past the set up stage!!
I am using a Mac on OS X 10.9.5. I have the latest version of Android Studio (2.1.2) and JDK/JRE 1.6 and 1.8 installed on my machine.
When I go to Android Studio > About Android Studio, it tells me the JRE is 1.6.
I'm also getting an error saying: "Rendering Problems Android N requires the IDE to be running with Java 1.8 or later Install a supported JDK"
I have JDK v1.8 installed.
In File > Project Structure > SDK Manager I have the following set:
Android SDK Location =
/Users/Tom/Library/Android/sdk
Android JDK Location =
/Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home
When I enter
echo $JAVA_HOME
it displays the following:
/Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home
When I enter
echo $JDK_HOME
it also displays the following:
/Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home
Why is Android Studio not recognising the 1.8 JDK?? Have been googling for 3hrs and getting nowhere. Any advice hugely recommended.
Just move your default Android Studio JRE, in this case to move JDK 1.6.0, on OSX do this
sudo mv /Library/Java/JavaVirtualMachines/1.6.0.jdk /tmp
Then restart your Android Studio, and check "About Android Studio"
When I tried to install the JDK, it was installed but in start->java Development Kit: I faced with "empty"word.
But when I went to cmd and writed javac version or java version I saw true results and when I tried to install SDK for programming android with eclipse or install android studio I had not any problem for installing
But after installing when I created a new project in both softwares I had problems.
What I must do? Every time I try to install JDK it is installed as now.
I just downloaded Google's new android studio bundle(x64 for Windows) and also installed JDK8 (C:\Program Files\Java\jdk1.8.0_25) (x64 version).
But on the android studio setup it does not detect JDK and asks to locate its path. I located its path but still it says it is not valid.
I tried declaring new Environment variables (both system and User) but still I get same error.
I also tried in cmd, and it says that java & JDK is installed.
After that I reinstalled JDK 8 for windows x64 from Oracle. But no changes in android studio...
Please Help. !
I had the same problem. I discovered that it was caused because I installed the JDK while the Android Studio installer was still opened and at the prompt to load the location of the JDK. Closing the Android installer and then reloading it after the JDK installation had completed and was closed out, solved the installation problem for me.
In my case, I am using java8 and based on Doc I just had to add the following:
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
While running Java 6 something I tried to install Android Studio. Android Studio did not find Java 7 or Java 8, so it asked me to install at least Java 7 and gave a link to Java 7. While the original instance of Android Studio Installer was still alive, it would not find Java 7 or 8. killing and restarting Android Studio Installer worked just fine.
So install Java and restart the installer.
I have same error but i closely look into the note and then my problem solved :)
It needs JDK 7, as stated on the System Requirements page: http://developer.android.com/sdk/index.html#Requirements
Update:
For Android Studio 2.1, it needs JDK 8 for Windows or Linux, and JDK 6 for Mac.
I solved this problem by closing the installation file, and open it again as an administrator. Pre over the need to set jdk.
Downloaded OS X Yosemite Beta 3 and I'm trying to run some eclipse based IDE's, namely Titanium Studio and Aptana Studio.
Running into this error message when I try to start the apps. Didn't work on boot, so I downloaded JDK 1.8.0_40, still no dice. It's looking in the proper location, the file exists and it's using the correct java version. Not sure what the issue is, any help would be appreciated.
Download the newest version of Java for OS X 2014-001 from Apple. http://support.apple.com/kb/DL1572?viewlocale=en_US&locale=en_US
I encountered the same error this morning and this was a quick and easy fix.
I got this problem when I try to lunch AptanaStudio 3.1 on OSX yosemite.
I google this problem for quite a lot and found that JDK1.8(64-bit) version just does not support the Aptana Studio(3.1), maybe also not working on some other IDE which based on the same skeleton of Eclipse.
The only solution I can came out is to install an older version of JDK, and I found that the link #ChancePance provide just worked for me.
Why I am answering this question is just to specify that it's OK to install this version of JDK(which is version 1.6.0_65, 64-bit when I download the package) alongside with the J2SE 1.8(provided by Oracle). So you don't have to worry about there is any conflicts while installing two version of JDK.
I need the JDK1.8 for some of the new features of the latest version of Oracle's J2SE. And I need Aptana Studio at the same time. I am quite worried about there might be some conflicts.
Below is what I have done on OSX Yosemite to solve the problem of AptanaStudio3.1:
Download and install the package: JavaForOSX.
Found the file "AptanaStidio3.ini", the file by default located under the the directory here: /Applications/Aptana Studio 3/AptanaStudio3.app/Contents/MacOS
Add "-vm" argument to specify the java which will be used to lunch Aptana Studio.
-vm
/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java
Hope this will help you guys who got the same problem.
I ran into this problem as well. Apparently Aptana Studio is 32-bit, while the java I have installed is 64-bit.
I didn't want to revert to Java6 as the accepted answer suggested, so I solved it another way.
I downloaded a 64-bit version of Eclipse and installed the plugin version of Aptana Studio.
I was also experiencing this problem because I had a 64 bit JDK 1.7 installed (the standard Oracle version - not the Apple version indicated in the other answers) and had mistakenly downloaded a 32 bit version of Eclipse. Doh!!
I removed the 32 bit version and downloaded the 64 bit version of Eclipse and everything works great now.
Simply downloading the newest Java for OSX worked the charm. I clicked and downloaded the file from the link above -> http://support.apple.com/kb/DL1572?viewlocale=en_US&locale=en_US <
Open "/Applications/BonitaBPMCommunity-6.5.0/BonitaBPMCommunity.app/Contents/MacOS/BonitaBPMCommunity.ini"
Obtain the location of the JRE / JDK on your system by executing in a terminal:
/usr/libexec/java_home
Add 2 lines after adapting the ...jdk1.8.0... to your system as found out above
-vm
/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/bin/java
in between the following lines:
-clearPersistedState
-vmargs
This problem was asked many times, but none of solutions doesnt help me.
I am using Windows 7 SP1 (x64), JDK 1.7.0_03 (x86), JRE 7 (x86) and Android SDK Tools r16.
When I install Android SDK Tools it says -
Java SE Development Kit (JDK) version 1.7 has been found
But after install SDK Manager closes instantly. android.bat and find_java.bat say -
WARNING: Java not found in your path.
I have tried set enviroment variables JAVA_HOME, PATH manually but this doesnt help. Searching solution many hours, setting variables, reinstalling java / sdk - nothing helps.
Thanks in advance.
Install the x86 version, not the 64 bit version.
Android requires Java 1.5 or 1.6.
I haven't tested this, but I have seen posts about Android working with 1.7 as long as you also have 1.6 installed. Although this requires having two versions of java installed, and I am not sure it's worth it.
maybe you are using JRE, not JDK.
You can check which java you are using with: where java
I just set a Environment Variable named JAVA_HOME with the value: C:\Program Files\Java\jdk1.7.0_05\
The problem is solved and sdk works properly.
Well, I was facing the same problem, I found that the error might be a resolved by doing the following.
Download Android SDK, try to install, you get a java error (if you don't have it)
Typically you go download java, install and hit retry - but fail.
Adding JAVA_HOME didn't help, so I rebooted the pc and tried again.
Success, I don't know if it's the reboot after installing JAVA, or reboot after adding JAVA_HOME that solved the problem. One of them did the trick.
My recommendation is :
1. Install JAVA (in my case 1.7 x64), reboot.
2. Install android sdk, if it fails, add JAVA_HOME as explained above somewhere, reboot.
3. Install the sdk.
I know that this may be outdated, but someone would probably find it useful. I had this problem myself, easiest(maybe dirty) solution I came up with is to change the default location when installing android studio.
Something like this :
C:\Program files\Java\jdk-xxx\
to =>
C:\Program files(x86)\Java\jkd-xxx\
Installer is searching in x86 Program files folder probably for a 32bit version, but its working perfectly for me this way :)
If you believe you have JDK installed and it was not properly recognized, set SDK Location on Eclipse (Windows > Preference). You can open/Update SDK Manager thru Eclipse.
Work fine in my Windows 7 SP1 (x64), JDK 1.7.0_03 (x64), JRE 7 (x64) and Android SDK Tools r17.