java 9 does not work yet any way to fix and i can not get java 8
@noah12345678 Why cannot you get Java 8 ? http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Unity Guys, the tutorial on setting up android for unity is broken and no longer works. This is the tutorial I’m referring to: Learn game development w/ Unity | Courses & tutorials in game design, VR, AR, & Real-time 3D | Unity Learn
The set up of the android SDK says to run the SDK manager but if you do it fails and says its obsolete. Anyone have a decent working set of instructions on how to instal the Android SDK that doesn’t involve AndroidStudio please.
Particularly this step fails:
- Double click the file called android to run it.
With the android sdk tools version 26 or later the only way to get the graphical user interface for the sdk manager is to use Android Studio. If you really don’t want to use Android Studio, the only other way to install sdk components is to use the command line tool which is /tools/bin/sdkmanager. run sdkmanager with --help to see available options. You will probably want to use --list option to see installed and available packages, then run sdkmanager with [quote]
tools platform-tools “build-tools;”
[/quote] options to install required tools (specifying build-tools which you want from the available packages, something like 26.0.0) and then run sdkmanager with [quote]
“platforms;android-”
[/quote] to install android sdk platform versions which you need. If this is not clear, try reading sdkmanager --help output, maybe it will become clearer. As I’ve said before, the recommended way of installing android sdk and all of it’s components is to use sdkmanager UI which is available with AndroidStudio.
I would prefer to use AndroidStudio but there are no instructions on how to integrate it into the Unity build process
Just to make it clear: Unity does not need Android Studio to build android applications, it only needs android sdk. However with the latest android sdk versions, the only way to get UI when installing sdk components is to use Android Studio. Once you install / update android sdk, you only have to specify its location inside of Unity editor. Apart from that you don’t need Android Studio to build android applications with Unity.
I must be really thick. I’m trying to tell you the instructions for building Android in Unity don’t work. They must be out of date. I installed AndroidStudio but where did it put the Android SDK? I can’t find it anywhere. Does anyone have an up to date step by step instructions for how to install the Android SDK that Unity needs to build to Android.
Bear in mind if I knew how to do these things I wouldn’t be needing Unity to do it for me.
See this post https://forum.unity.com/threads/can-no-longer-get-unity-to-build-for-android.510609/#post-3337962 it shows how to open the sdk manager from the Android Studio and the path where Android sdk is installed. You have to provide that path to Unity editor.
Note that in the sdk manager there are “SDK Platforms” and “SDK Tools” where you can select which sdk components you want to install.
@arkon sorry that the tutorial didn’t work for you. It says “Checked with 5.3” and it definitely needs an update. I added a task for our team to do so.
I’ve got this now. I have Unity 2017.3.1f1
I have just install JFK 1.8u152 as instructed. I have SDK API levels 15,21,22,25,26,27 intalled on my E drive using Android Studio.
I set the toolset to, well, I’ve tried everything.
I have everything pointed to the various locations under preferences->external tools.
I have set the enviromnent variable ‘JAVE_HOME’ which didn’t even exist before.
I still get the ‘Unable to get target list…’ error, and I’m about to throw the fecking monitor out the bloody window with a large deep roar!!! - He says calmly and collectedly. - Someone please fix Android builds, otherwise what is the point of using this thing called ‘Unity?’
Thanks,
Dave.
edit: Finally! Using this ‘tools’ set makes the error go away:- https://fossies.org/windows/misc/android-tools_r25.2.3-windows.zip/ but I had to delete the previous ‘tools’ folder in the sdk, I don’t know why.
*note I have JDK 1.8 and 1.9 installed as I need 9 for something completely unrelated to Unity.
This is not a fix, it’s a bodge with a bit of sticky tape and a couple of staples. Needs some proper work by Unity.
Also, please test Unity releases on a blank Windows install first, that way any legacy bodge work won’t pass under the radar.
I’ve been 5 hours on this. Implemented each of the suggestions above. Still not working. Unity, we know it’s other people’s tools that are the problem, but it sure makes you look bad. You have made an incredible development tool but if people have to go through this just to build on Android, then I want to know, what else can I use?
Sorry to hear you frustrated.
Unfortunately you didn’t share the editor log with the full info on the problem.
I suspect that despite setting JAVA_HOME and the locations in Unity preferences, Android tools are still trying to use Java9. The easiest solution to me was to uninstall JDK9.
I’ll pass your offer on testing on a clean PC to our QA team. Thanks for the feedback!
@ZzappSizzler the only currently known issue with Unity for Android is the Java9 issue in this thread. If you are experiencing anything else - feel free to submit a bug report.
I’m currently reinstalling Unity, Android Studio, and Java SDK. The bundle is not available any longer from Android, you have to install studio, open up the app, and then let it download the tools (it’s not explicitly in the install wizard). I tried downloading the tools separately to no avail, going this route actually downloaded (like it used to) all the tools necessary. I guess they really want people using Android Studio :-/
BTW I am still using Java 8.0 as it works for me, didn’t want to try 9.0.
This is what happened to me as well. I had to open Android Studio, and from there it prompted me to download the SDK.
This appears to not be fixed yet: I’m getting the issue with 2017.4 and jdk10.
And just tried with 8 and I still get the same error. :(((
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Help?
For a solution please check my entry here:
https://stackoverflow.com/questions/49630165/how-to-configure-unity-2017-4-to-target-android-and-avoid-build-failures-on-osx/49630166#49630166
Thanks but I’m not sure I get it.
How do I fix it on Windows and what does it imply? That I cannot use java 9+, like at all ?
@ correct. The easiest solution is to uninstall JDK9/JDK10 completely.
Alternatively, you could mess with the Java settings so that Android SDK tools don’t use anything other than JDK8… But in this case you’re on your own.
OK, I’m uninstalling everything java related from my Windows 10.
What do I do to compile an android build of my unity project now?