Unable to install Android SDK - java

I had a Windows XP. I also had JDK6. I downloaded "Android installer r11" for windows. When I click the installer, the error message is displayed as alert Java SE development kit is not found, Then the installation cannot happen.
But in my system I had a Java SE 6. I cannot find why it is not take the Java.

Try this step it may help you:
Installation sequence: JDK, Eclipse, ADT, Android SDK
1. JDK
First, head over to Oracle Web site to download and install the latest Java Development Kit.
Ensure that the environment variables look something like this:
CLASSPATH
C:\Program Files\Java\jdk1.6.0_10\lib;C:\Program Files\Java\jdk1.6.0_10\lib\tools.jar;
C:\Program Files\Java\jdk1.6.0_10\lib\dt.jar;
PATH:
C:\Program Files\Java\jdk1.6.0_10\bin;C:\Program Files\Java\jdk1.6.0_10\jre\bin;
At the command prompt type java-version to view the current system has been installed Java version.
2. Eclipse IDE
Next, from the Eclipse Web site Download the latest Java Eclipse Classic as our development environment, select here eclipse-jee-helios-SR1-win32 version, download the Eclipse is not good need to install, unzip to the right place to use.
3. ADT (Android Development Tools plugin, Android Development Kit)
ADT is an Eclipse plug-in, due to the use of the Eclipse version, the installation process referred to in the following menus and options may vary.
Then, start Eclipse, choose Help-> Install New Software ..., pop-up "Install" dialog box.
Click the Add ... button, pop-up "Add Site" dialog box:
Enter the Android update site here: Location: http://dl-ssl.google.com/android/eclipse// When you're finished, click "OK", back to "Install" dialog box.
In the "Install" dialog box, select just added the update site, waiting to find the appropriate version of Eclipse Select ... "Develpoer Tools" of all items, all the way to click "Next", accept the agreement, click "Install" start the installation.
After the installation is complete, restart Eclipse.
4. Android SDK
Next, from the Google website download the latest android-sdk. Extract the zip file to appropriate directory, remember the absolute path. Run the SDK Manager installation.
In Eclipse, select Windows -> Preference -> Android, enter the directory on the step down the path, click "OK".
The latest SDK, only tools, but no longer contains the platform or the Google add-on, we need to use the "Android SDK and AVD Manager" to install and update, such as platforms, tools, add-ons, and documentation of these SDK components.

%JAVA_HOME% should be in your path. Half of the time you can have an SDK and be missing that variable.
Get thee to a command line and type echo %JAVA_HOME%, or simply see if you get any output from javac -version. The exact variable for Java home is probably not quite right, but the second step should work. If javac fails you, you either never installed Java SDK (aka JDK) and instead got the SE, or you still haven't set the java binary folder into your path. Use your Windows search and look for javac.exe.
If nothing else works, go to java.sun.com and re-download and install a new SDK. The annoying part is that Glassfish and other things tend to complicate the java setup because they too must be set up during install or shortly thereafter.

Related

JDK directory is not set or invalid (unity)?

I am now creating a keystore for my game (in unity) but when I press the add key button, an error pops up
Java Development Kit (JDK) directory is not set or invalid. Please, fix it in Preferences -> External Tools
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:187)
I installed the JDK and checked the path of it in the terminal using the command /usr/libexec/java_home, then it shows me that the path of the JDK is /Library/Java/JavaVirtualMachines/jdk-14.0.1.jdk/Contents/Home.
I copy and paste it in the JDK path in unity but the error still pops up.
I actually checked the JavaVirtualMachines in my computer's library but there's nothing in it.
How can I solve this problem? Any help is greatly appreciated.
Actually I solve this problem by adding the modules (Android SDK & NDK Tools, OpenJDK) to my Unity Editor. Actually if you tick the Android build support module, it won't automatically help you to tick the two modules above.
This solved for me in Linux (don't know if the case happens in Windows)
chmod -R 777 ~/Unity
This command set all privileges for all files/directories/subdirectories for the user.
Getting the error of this topic, for curiosity I tried to run the "java" executable inside the directory
~/Unity/Hub/Editor/2021.3.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/OpenJDK/bin/
And got:
bash: ./java: Permission Denied
This explains why set the privileges.
I had the same problem, another solution doesn't work for me!!
I just uninstalled and then installed back using the unity HUB and it's worked.
Click on the three dots and uninstall
then click on add to install back the desired module.
While installing don't forget to check android build support and its all subcategories.
Also, I think I had installed more than one version of unity, that could also be a problem.
Check your Unity installation path in my case
C:\Program Files\Unity\Hub\Editor\2019.4.13f1\Editor\Data\PlaybackEngines\AndroidPlayer
this AndroidPlayer folder in NDK, SDK, and OpenJDK these folders are important for APK file generation.
These files are not properly installed then these files copy for another unity version.
enter image description here
Only one version you have then re-download it.
Edit the environment variable like this path in your case path was different but make sour bin folder is important.
C:\Program Files\Unity\Hub\Editor\2019.4.13f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin
enter image description here
Solve the problem.
I solve the problem by changing the paths inside:
edit->preferences->external tools
To point to the correct version as I download a different version for the SDK, NDK and JDK when using the hub. This can be done by ticking the checkboxes.
As #Jelly Qwerty answered, installing android platform alone won't install jdk, sdk and ndk. What you got to do is:
Open Unity Hub
Go to "Installs"
Click on the 3 dots on the upper right corner of your unity installation and select "Add Modules" Unity Hub Settings 1
Expand "Android Build Support" and check "Android SDK & NDK Tools" and "OpenJDK". Unity Hub Settings 2
Once the tools are installed you should be able to build your apk.
Cheers
I unchecked and checked the box for "JDK installed with untity" in Preferences>Externals Tools.
A window popped up and it installed some files and it fixed my issue
In Unity hub navigate to your unity versions, in the desire version click the doted menu and select add modules, if you already have android support, it has other options to install the android skd, ndk, and open ndk
There is no 3 dots and there is no installing JDK, Gradle, SDK, or NDK.
I always get Gradle building errors when I install these components manually, although they are the compatible ones of my version.
I want to download them automatically by unity, but the options you are talking about don't exist.
enter image description here

Need help using IntelliJ and setting up a project SDK

When I try to run my program using IntelliJ it says I need a project SDK but when I try to set up a project SDK, it says "The Selected directory is not a valid home for this SDK"
This can happen when a java SDK is deleted, moved, or configured incorrectly.
Go into Project Structure (Ctrl+Alt+Shift+s)
On the left under Project Settings select Project
Now see the Project SDK: - it is likely red if cofigured incorrectly or it might say <No SDK>.
Firstly, just see if there is another SDK of appropriate java version in the drop down list you can use.
If not, you can use Edit button on an existing JDK to modify the JDK home path if it is wrong.
Or just press New... and JDK to set up a JDK that is already installed on your machine (e.g. C:\Program Files\Java\jdk1.8.0_72)
...if you have no JDK on your machine (be aware of the difference between a JRE and a JDK) then you'll obviously need to download and install that first

How to install an old version of JDK in windows 7?

I already have some version installed on the machine, 1.7 and 1.6.
Now I have the need to install version 1.5, but when I try to install an error occurs, speaking to uninstall the versions that I have the Java (JDK).
I have no chance because I have other applications using these versions, is there any possibility to do this without uninstalling these versions I already have ?
Thank in advance !
Bypassing the installer is bit of work, but doable. How to extract Java from the EXE installer is described in this answer: https://stackoverflow.com/a/6571736/73652
The JDK is a package of tools for developing Java-based software.
Check your system architecture in the control panel, i.e. 32 or 64-bit.
Click on C → program folder → java folder.
If there is no JDK folder present, then follow the below steps:
Search in Google JDK download.
Scroll to bottom, and check for the system architecture of your system.
Click the download link and wait till the download is finished.
In downloads click on show in folder.
Click on the JDK icon and click on next until the setup process is completed.
Please find this video along with steps for JDK Install.

Can't get Eclipse to run with Java FX

Alright so basically, I'm trying to run Eclipse with JavaFX, but then it gives me this error:
You are not running your eclipse instance with Java7 or Java8. The JavaFX tooling is disabled because of this.Make Java7/8 the default system java or adjust your eclipse.ini to pass -vm pointing to your Java7/8 install.
In case you want to turn off this check open your preferences and go to General > Startup and Shutdown and uncheck 'JavaFX Tooling Java Check'
Now I know it isn't pointing to the right SDK, but I have no idea how to change it, since I'm kind of new to this this stuff. I've already downloaded JDK 7.40 as well. I'm also using Ubuntu on a virtual machine, if that even matters anyway. Can anyone help me, I'd appreciate it.
Pre-requirements:
Install Java™ 8.
Install Kepler SR2 (4.3.2) .
The Kepler is still not supporting Java8. What to do?
Open Eclipse
Help > Install New Software…
Enter the following URL into the ‘Work with’ field:
http://download.eclipse.org/eclipse/updates/4.3-P-builds/
Press ‘Enter’
Select category ‘Eclipse Java 8 Support (for Kepler SR2)’
Click ‘Next’
Click ‘Next’
Accept Licence Agreement
Click ‘Finish’
Now jre8 is correctly located.
Now configure JavaFx
Open Eclipse
Help > Install New Software…
Enter the following URL into the ‘Work with’ field:
http://download.eclipse.org/efxclipse/updates-released/0.9.0/site
Press ‘Enter’
Select category ‘Eclipse Java 8 Support (for Kepler SR2)’
Click ‘Next’
Click ‘Next’
Accept Licence Agreement
Click ‘Finish’
It looks like the default java on your system is not java7. What do you get when opening a shell and execute java -version? Solution is to:
A) make java7 the default java
B) start eclipse with -vm
Apparently, you have installed 32bit Eclipse and 64bit JRE/JDK on a 64bit OS. Please use 64bit Eclipse and the problem will be solved. Please make sure JAVA_HOME And JRE_HOME is present in environment variables.
I had the same issue. I tried re-installing Eclipse, but it wouldn't work. I had to completely remove the project and delete all the project files. After that, I re-started eclipse and created the project again. However, this time I made sure the project path included the Java FX library as shown in the screen shot.
Java Build Path
I did this while I was creating the project and then I was able to create the project without any issues. Give this a try.

Eclipse is saying "Update Android Developer Toolkit"

I've somehow managed to mess up my Eclipse and Android set-up and I'm not sure how to fix it. The symptoms of the problem are as follows:
In Preferences > Android, I try to select the location of android-sdk-linux, when select the error appears "This Android SDK requires Android Developer Toolkit version 20.0.0 or above. Current version is 18.0.0.v201203301601-306762. Please update ADT to the latest version."
Going to Help > Check for Updates in Eclipse, returns no updates found
Going to Help > Install new software and selecting work with ADT Plugin - https://dl-ssl.google.com/android/eclipse/. Selecting Developer Tools and next, returns
Cannot complete the request. See the error log for details.
"Android DDMS" will be ignored because it is already installed.
"Android Development Tools" will be ignored because it is already installed.
"Android Hierarchy Viewer" will be ignored because it is already installed.
"Android Traceview" will be ignored because it is already installed.
"Tracer for OpenGL ES" will be ignored because it is already installed.
If I then take a look at what is already install, Android Development Tools is listed and the version is 20.0.0.v201206242043-391819
Now for the interesting part:
If I go to Help > About > Installation Details > Features is lists Android Development Toolkit as Version: 20.0.0.v201206242043-391819 but if I then go into Plug-ins it lists Android Development Toolkit as Version: 18.0.0...
Sorry for yet another question on updating the ADT as there already seem to be quite a lot of questions on the topic but I've tried the typically solutions and they does seem to be getting me very far
Some extra info, that people often ask for
OS: Ubuntu 12.04 LTS
Eclipse Platform: Version 3.7.2
In your installed folder of eclipse there is a folder named plugins.
Do the following:
Find the plugin file/folder of Andriod SDK and move it to some other folder for backup.
Download from Android site the latest version of Android SDK
Copy/paste it in your plugins folder
Restart eclipse
And everything should be fine.
Try using http://dl-ssl.google.com/android/eclipse/ instead of https://dl-ssl.google.com/android/eclipse/
In the end, I just couldn't fix it so I complete uninstalled it and set it back up again from scratch, thanks for your help
Run software updates in Eclipse (Help > Check for Updates) and update the ADT.
I know I'm late to the game on this one, but I figured I would contribute since I ran into the same problem myself. In order to check for installed plugins in Eclipse, do the following.
From the Eclipse Preferences Menu..
-Select "Install/Update"
-From the General Menu, There should be a link button that says "Uninstall or Update"
This should take you to a prompt that will allow you to uninstall anything you've added onto your Eclipse setup!
Go to the below site
https://developer.android.com/sdk/installing/installing-adt.html
and download ADT-22.3.0.zip from the site.
then follow the procedures mentioned there..
uncheck "Contact all update sites during install to find required software"
see: Can not install Android ADT 21.1 on eclipse Juno (Windows 7) after upadate to SDK 21.1
After updating the Android SDK Tools to the latest version from the SDK manager, do the following:
Go to Eclipse->Help->Install new software
Type https://dl-ssl.google.com/android/eclipse/ in the "Work with" Text box
From the list, select all and then click next
Now Eclipse will prompt you that in order to install these new software, Eclipse will uninstall the old version (in this case Android Developer Tools), click on next, read and accept the license and wait for it to download
Restart Eclipse and everything should be working fine.

Categories

Resources