I am worried about this little problem: I am creating a mobile game in unity and I need java openJDK, but I cannot install it via unity hub, I have already installed open JDK on oracle website (but version 14, which is not compatible with unity - error message says), where can I download the right version winhout singing to oracle or paying it?
Or does anyone has a tip how to fix the hub installing issue?
I faced the same issue. Later I noticed that my antivirus is blocking installation. What you could do is, temporarily disable your antivirus and add Open JDK module from Unity hub. It will work. Don't forget to enable your antivirus after your installation completes.
On windows - right click your unity version folder (in my case C:\Program Files\Unity\Hub\Editor\2022.1.0f1\Editor) and uncheck read only then click apply. If this doesnt work,right click again ,go to security tab select ALL APPLICATION PACKAGES user and check Full control.
Related
So I've been getting these warnings in Unity 2019.410f1. Here's how it looks like:
But when I go to Hub to fix this, those packages are already installed.
However, there are no such folders in the directory where they are supposed to be (except for NDK folder, this one is fine). So here's my problem: JDK, NDK and SDK are NOT installed, but Unity Hub thinks overwise and doesn't let me install them. Reinstalling this version of Unity doesn't help either.
Does anyone know what can I do to fix this?
the bug
There has been a bug in unity forever with those.
The fix is, for jdk, sdk and ndk..
click copy path button,
untick the use version installed with unity box
paste in the path you just copied
(optional, save project and exit and repoen it)
Then just retick the boxes to put it back the way it was originaly
I dont think you are having this bug tho, your problem sounds different.
uninstall / reinstall
I'm really suprised uninstalling unity and reinstalling didnt fix it.
Maybe try uninstalling all versions of unity + unity hub, restart machine and start again installing unity hub.
Manually download
If nothing else works I think this would, but its not pretty..
Manually download sdk, jdk and ndk, untick the boxes and add the paths where you have put them. The jdk and ndk can just be downloaded.
jdk https://www.oracle.com/java/technologies/downloads/
ndk https://developer.android.com/ndk/downloads
But to get the sdk you have to install android studio, then download all the individual packages using the sdk manager (which is a tiny hard to find icon!)
Here's the steps I used to fix this:
Install and Open Android Studio
Open the SDK Manager
Copy the Android SDK Location (the SDK Manager shows this path)
Optionally install any SDKs you want using the SDK manager
Create a Symlink to point from the default Unity SDK folder to the default Android Studio SDK folder
On Windows, here's a symlink command you can use. You'll need to change the command to match the user on your system.
mklink /D "C:\Program Files\Unity\Hub\Editor\2020.3.20f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK" "C:\Users\YOUR_USER_HERE\AppData\Local\Android\Sdk"
Lastly, I had to refresh Unity to make the warning message go away.
Open Unity -> Edit -> Preferences -> External Tools -> uncheck & re-check the Android SDK Tools
For me Unity 2021.3.6f1. I fixed by changing the permission of the whole unity editor folder:
sudo chmod -R 777 Editor/
It was a bit extreme, but it worked for me.
It was the editor 2021.3.6f1 ubuntu 22.04
For me (Unity 2021.2.18f1) the problem happened because the NDK field's default value was wrong. The NDK was correctly downloaded by Unity but the path in Unity Editor was wrong so I changed the path to the correct one.
I could reproduce this error when installing older Unity Versions (for me 2020.3.25f1) with Unity Hub 3.x. For some reason the newer Unity Hub doesn't install Android SDK & NDK and OpenJDK for older Unity versions. It's a weird bug, but happened to me every time and on different machines. Possible Workarounds:
Manually install Android SDK, NDK & JDK and locate path in Unity Editor
Use Unity Hub 2.X when installing older Unity Versions
Install newer Unity Editor (e.g. 2021.3.10f1). For some reason sdk, ndk and jdk are properly installed here. You can either copy it over to the other Unity Editor installation (Might get a filename too long exception though) or just link to the path from the 2021 installation in your 2020 editor. Pay attention to the required version though. If there's a version missmatch this workaround doesn't work.
All in all weird bug, weird workarounds but for me all of them worked with the last one being the most convenient since I usually have the newest recommended version installed anyway :)
When I try to install Java 9 support plugin for latest Eclipse Oxygen from Eclipse Marketplace it stops on "Calculating requirements and dependencies" step. I have completely fresh instance of Eclipse (JEE package) and both, Java 8 and 9 installed.
When I revealed "sleeping" taks in progress area I found that it stops on this step (marked with red rectangle):
I tried few suggestions found over internet:
Disable firewall (windows built in and on the router side) and windows defender
Disable "Contact all update sites... option from "Install new Software" window"
run eclipse with vm parameter -Djava.net.preferIPv4Stack=true
even tried to install this while running at Windows Safe Mode
Changed Preferences -> General -> Network connections settings
Install packages manually by "Install new software" window instead directly from MarketPlace
None of them helped so far. Furthermore, when entered given url into web browser window, I was able to download content.jar. This entry comes as software source only when I try to install Java 9 support. It was not present on the software sources list and enables automatically every time I retry plugin installation.
Has anyone faced similar problem and knows how to solve it? Am I missing something?
A partial solution to my problem was to disable apache http client, described here: Disable Apache HttpClient.
It allowed me to go forward and install any plugin from Marketplace (actually Java9 plugin was only just one of many due to that "corrupted" URL.
I would not treat that as a permanent solution, cause I still don't know why default configuration is not working properly, but I can move on.
Ok so anyone answering please be aware that I am a complete beginner to all of this. But I have installed jdk1.8.0 because that is what the newest version of android studio needs, but when I open Android studio up, it says I still need to change it. So after a lot of research I made a new Java_Home variable and set the directory to where my jdk file was. I then went into android studio file, project structure, then changed that jdk directory as well. However, when I click ok, It still doesn't work, and when I go back to the project structure, it changes from jdk version 8, to my old jdk version 7 directory. For some reason it isn't saving :(. I would really appreciate some help here.
You could try to disable the old JDK in the "Java Control Panel" (JCPL). Start the JCPL by double-clicking on jre\bin\javacpl.exe (it's a Swing application, i.e. it has a GUI). Choose tab "Java" and click on the button "View ..." to see a table with all installed JDKs. Each JDK has a checkbox "Enabled", which should be unchecked for the old JDK.
When you restart Android Studio after this it should ask you for the path of the JDK.
The following question might also be helpful to solve this issue: Android Studio JDK location changes back to 1.7 every time it is updated to 1.8 path
I am running Windows 7 and just upgraded my Android Studio and it is not working anymore. I get a dialog that says it cant find the jdk. I have version .9 now. I do not have admin rights so I can not edit my Enviroment Variables. Is there a way I can tell Android Studio where the JDK is. Maybe command line args? I havent found any source that outlines if there are any.
Please note that I can not run Android Studio, so I cant update it from inside the application.
Also, I do have Cygwin.
Since, Android Studio was working before and only broke after the update, please check the Studio shortcut you're using to launch the IDE. By default, Android Studio points it to studio64.exe. If you have a 32-bit Java JDK installed use the studio.exe to launch the IDE.
If that doesn't help, see if you can create a JAVA_HOME user variable? You maybe able to do that even though you have a limited account. If you are unable to do so, as a last resort, move/copy the JRE (not JDK) into the Android Studio install location (right next to bin). You need to name the folder jre or jre64 depending on which launcher you use studio.exe or studio64.exe.
I solved this. I download the Server JRE from the Oracle page. I then decompressed the gzip and untared it. I then then added to my ~/.bashrc file in cygwin "export JAVE_HOME=". Studio was able to find this.
I am running CentOS 5.5 x86_64 with JDK 1.6, Eclipse Galileo, and the 0.9.7 ADT is installed; however, after installation, the Android project type is not available. I have checked in the installed packages list and it is installed. Anybody encounter this problem before? Could it be due to my use of the 64-bit java VM that is installed on my system?
This usually happens when you dont select any android SDK in "Preferences > Android" You just have to reset the perspective in eclipse, Windows > Reset Perspective.
Hope this is still helpful.
Hope you have already set the Android Preferences if not Window -> Preferences-> Android and browse to the android SDK folder.
In rare cases even after doing this step, Android Project option doesn't show up in File -> New. But you can get it by File -> New -> Project .. and choose the android project from the options displayed.
Ok. I reinstalled eclipse and android. I think the problem was that I hadn't unpacked the android tools first. The plugin was installed, but it had nothing to talk to! Anyway, all the android related stuff now shows up in Eclipse.
Using Windows 7, 64-bit edition, with the latest Eclipse (Indigo) and the latest ADT plugin, I had the exact same problem. No Android project type, no Android in Windows/Preferences.
Like #Rubberman I solved the problem by totally re-installing Eclipse. Eclipse doesn't seem to use the standard Add/Remove Program stuff in Windows; I just deleted the Eclipse install directories and my Eclipse workspace directory, re-installed Eclipse, and re-installed the ADT plugin.
I would have liked to have just removed the plugin and re-installed without deleting the whole of my Eclipse install, but I couldn't figure out a way to do that. I don't see any way to remove a plugin, and when I tried to choose ADT for installation Eclipse gave me an error, saying "I can't install that because it is already installed."
I Know its a very old post..but still it may help someone with same problem...
I wanted to jst share that we can uninstall the plugins without the need of reinstalling eclipps..by simply going to 'already installed application' link and selecting all the android related options and simply clicking on uninstall button..Now you can add fresh android sdk to your ecllips..I have tried it and it works..
Hope, I helped aomeone..:-)
Ok, been looking for the answer to this for an hour, it's not well mentioned.
if you are using linux then you need to add 2 more things to install ADT correctly:
GEF from http://download.eclipse.org/tools/gef/updates/releases
WST Server Adapters from http://download.eclipse.org/releases/galileo/ (modify for your release)
do it the same as the adt plugin install.
maybe you need to uninstall then reinstall the adt plugin after?
sources:
ubuntuforums.org/showthread.php?t=1595684
sonalsantan.blogspot.com/2010/10/eclipse-adt-plugin-on-ubuntu-1010-after.html
You have to install the Eclipse plugin called ADT.