I want to learn to make Java Android applications in Android Studio,
I downloaded both the Java JDK and Android studio on an external drive (D:).
I'm getting this error on start-up:
tools.jar seems to be not in Studio classpath.
Please ensure JAVA_HOME points to JDK rather than JRE.
So I already searched Stackoverflow for the same error, but my Java folder seems to be a little bit different (it makes me wonder if I downloaded the correct JDK).
Because the advice was to either move tools.jar or change the value of JAVA_HOME.
None of those are an option because i can't seem to find the JDK in the Java folder. (D:\Java)
Did I install the wrong JDK?
Thanks in advance.
1) Download JDK: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
2) Android Studio -> File -> Project structure -> JDK location. Point at where you have installed it.
Related
I'm new to programming and wanted to give the newest Android Studio a try on OSX as I'm getting started.
I went to:
https://sites.google.com/a/android.com/tools/download/studio/canary/latest/
where it said:
Please download a full IDE image linked below to ensure you have the
correct JDK bundled with the installation.
I downloaded the file and completed the install and now get a warning in Android Studio to:
Please choose a valid JDK directory.
There is a jdk subfolder in the Package Contents of the Android Studio program itself at:
Applications/Android Studio/Contents/jre/jdk
However, this doesn't seem to be what I'm looking for. I know you can download Java from Oracle's website, but I'm not sure if this is what I should be doing or not.
At first I thought the text from the install page linked above meant that the JDK was bundled in the Android Studio 2.2 Preview 1 installer, but now I'm thinking that is not the case.
If I do need to get a JDK for my Mac, which one do I use please? Otherwise, if a JDK came with Android Studio, how do I select the valid JDK directory?
Thanks in advance.
The Android tools install the SDK for Android, but you still need a JDK. Install this one for mac osx:
jdk-8u91-macosx-x64.dmg
on page:
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
I was trying to install the android studio in my computer (Win 10 - 64x).
By the name, probably the version is 1.4.1:
android-studio-bundle-141.2456560-windows.exe
But I keep receiving a error saying: "We could not detect a Java Development Kit (jdk) v7 or newer on your system."
Currently, I have the jdk1.8.0_71 (64x) version installed. The environment variables JAVA_HOME and JDK_HOME (not sure if this specific one is really necessary) set, and the Path has been edited as well.
As you can see here, every variable and settings are set
Also, I've tried changing the jdk version to the 1.7.0_79 (64x), and I've also tried placing the path between quotes.. But all of it was in vain
It is strange, because I'm a java developer (not android), and I've never seen something like that.
p.s.: Every time I change the system environment variables I restart the computer to ensure the functionality of those variables.
Make sure both your Android Studio & JDK 7 are of either of 64bit or 32bit both. If JDK is of 32bit and Android Studio of 64bit or vice verse, It won't work together.
Assumed that, you have set your JAVA_HOME & PATH correctly.
Thank you SO MUCH Grimmy Vorner!!
I spent my day reading everything and I finally was able to get it working by using the "SDK tools package" (android-sdk_r24.4.1-windows.zip) instead of the "Android Studio package" (android-studio-bundle-143.2915827-windows.exe) from https://developer.android.com/studio/index.html
Also, go to Build -> Edit Build Types -> SDK Location -> JDK Location and make sure it is pointing to the correct jdk version (JDK 7 or JDK 8).
I tried everything that all of you said, but nothing seemed to work. After all I discovered that I can download a zipped version instead of an installation wizard. All I had to do was unzip the android studio and execute the studio64.exe file, and then everything worked perfect.
Still don't understand why it was not working properly with the installation wizard..
Anyway, thank you all for you effort!
I hope that all this information can help others in the future!
I have installed Java 8 on my computer but Android Studio doesn't find it. When I execute the installer of Android Studio I only can see an screen in which I can see an introduction and when I press "Next" another screen it's displayed in which says:
We could not detect a Java Development Kit (JDK) v7 or newer on your system. Please browse to its path if known.
So I searched my JDK and when I press the button "Next" I get the following message:
Sorry, we still could not detect a valid JDK, which we need to proceed.
If setting your JDK path manually, make sure you have browsed to a parent directory that contains a "bin\java.exe" whose version reports 1.7 or higher when you run "java.exe -version".
After that, I go to the console and execute the command "java.exe -version". It gives to me:
java version "1.8.0_60"
So I don't know why it doesn't find my JDK. I also tried adding some Environment Variables:
JAVA_HOME: C:\Program Files\Java\jre1.8.0_60\
JDK_HOME: C:\Program Files\Java\jre1.8.0_60\
But it still doesn't find it. How can I fix it?
Note: I'm using Windows 10 as OS.
Thanks in advance!
I think your JAVA_HOME variable is set to the wrong thing. Mine is:
JAVA_HOME C:\Program Files\Java\jdk1.8.0_60
I also have a PATH variable set as follows:
PATH %JAVA_HOME%\BIN
I do not have a JDK_HOME variable.
Try that and see if it works.
(I recently installed Android Studio and had the same problem, even though I had Java 7 installed. So I downloaded Java 8 and manually updated the JAVA_HOME variable.)
I had the same problem when trying to install Android Studio bundle v2.1 (143.2915827-windows) on a Windows 10 machine with a JDK at a non-standard location (the JDK on a path containing spaces). After manually selecting the path, the installer would complain that it could still not find a JDK. I solved it by manually enclosing the selected path with double quotes by typing in the editable textbox.
This drove me nuts for a couple of days. I was not able to resolve the issue through the Android studio installer, but found a workaround:
Go to http://developer.android.com/sdk/index.html
Instead of downloading "Android Studio package" (the exe file), scroll down and select "SDK tools package" (the zip file).
This work perfectly and allows you to select all the packages you want to download, including the packages installed by the installer.
What worked for me. I recieved the same error message and went to directly install the java, without closing the installation of Android studio. then tried to find the path. so I closed out the window for Android Studio and Reopened the download file and it automatically detected it. This might not work for everyone but worth a try. easier then messing with everthing else.
Sorry if this is the wrong Stack Exchange, but this is where most of the questions were asked when I googled my problem.
For some time now I've been having problems with Android Studio and the AVD/SDK. It seems to be a relatively common problem, but I haven't been able to fix my problem with any of the solutions that worked for everyone else. This is the error I'm getting whenever I try and run the AVD or the SDK:
Cannot launch AVD manager.
Output:
Access is denied.
ERROR: No suitable Java found. In order to properly use the Android Developer
Tools, you need a suitable version of Java JDK installed on your system.
We recommend that you install the JDK version of JavaSE, available here:
http://www.oracle.com/technetwork/java/javase/downloads
If you already have Java installed, you can define the JAVA_HOME environment
variable in Control Panel / System / Avanced System Settings to point to the
JDK folder.
You can find the complete Android SDK requirements here:
http://developer.android.com/sdk/requirements.html
I've tried re-installing everything Java (Both JRE and JDK), reinstalling Android Studio, running as admin, configuring permissions and a bunch of other stuff. I'm running Windows 7 and I've tried both JDK/JRE 6, 7 and 8 (JDK 6 worked very poorly though). I don't really know what kind of information you need to help me solve this problem, but I'll supply any information needed as fast as I can. Thank you very much.
Edit:
Please note that Java IS installed. Both Java and Javac is working fine in cmd.
I can suggest that Go to Windows -> Preference -> Java -> Compiler
And try with different java version.
Probably your Java folders are in the path (and that's why they work from CMD) but your JAVA_HOME is not defined.
As you are on Windows try creating a System Variable following those steps
Try (re)installing the ADT and see if it works. If not, go to the sdk's root folder ([PATH TO THE UNZIPPED ADT]/sdk) and open the AVD Manager.exe. Does it still give you the same error? If not, try to open the SDK Manager.exe and make sure you've installed all the propper APIs. I'd recommend installing at least the SDK Tools and Platfom-tools, and all of API19 (Android 4.4.2).
Finally Solved my problem! Some software I had previously installed had created a Path in User Variables, which was the one I was using for my JDK path. I tried using the Path in System Variables and it worked just fine! Thanks to everyone who took time to help me.
I'm using Windows-7 64 bit and I have installed this(jdk-7u45-windows-x64) updated JDK in my system. My SDK was updated upto API level 18(Android 4.3).
When i click on SDK manager in the eclipse, it does not start. I tried open it directly with Administrator permission also. But it does not start. I had tried to set the variable path like these.
But I'm always getting the same error like this.
After I found that in my find_java.exe get the java path from windows\system32 as shown below .
How can I set the Java path to my installed java folder.
Need some one help to figure it out. For Reference look at this link also.
SDK manager not starting
While setting the environment variable try JAVA_HOME variable pointing the bin directory.
because the android checks the java.exe in particular path.
I am new to android,As long as i studied ,Android requires Java 1.5 or 1.6. You are using 1.7
Google does not add complete jdk 1.7 support to android system requirement(some api are exception) .. It does not mean that you should not have jdk 1.7. you should also have 1.6 jdk for compiler compilance. it is a better way to avoid using 1.7 jdk ,if u dont want jdk 1.7 features.
http://developer.android.com/sdk/index.html see the system requirements and even if u developed using 1.7...when you installing your app in real device .we may face signing issue.
you may use some jar file which targetting java 1.7. but android system runtime(dalvik jvm) does not know how to process those files which means dex tool wont process those files which belongs to 1.7 and it wont create classes.dex file..hope it will help somehow
From the error you have posted it seems the problem is only with the path settings.
Add the path upto the bin folder of your jdk - C:\Program Files\Java\jdk1.7.0_45\bin and restart the eclipse.
Please verify if your SDK Location in the Window->Preferences->Android points to the correct SDK path.
Download latest android bundle from http://developer.android.com/sdk/index.html.
and replace new sdk folder with old sdk folder from android bundle folder.
now it's may work.
Finally Reinstalled my OS and Installed JDK 1.6. Then I have added my updated SDK to my ADT. It works fine now.
I've had the same issue, and this solved it