Hi I’ve seen there are a few tutorials including on youtube how to set up android for unity 2018 but I can;t find any that covers the speicific issues I’m having.
When going to create a build Its saying it can’t find the SDK. I Have android 10.0 (Q) downloaded from android studio and I’ve selected the file location and says unable to find SDK when I go to build or select the folder in external tools.
I’m selecting the same location as stated in android studio for me which is
C:\Users\Fierce\AppData\Local\Android\Sdk
Im reading the the manual and its showing information for 2019
I don’t have the option as you can for 2019 to also download the SDK and it says it doesn’t support SDK versions that unity isn’t providing so I have no idea how to fix this issue…
Hi, this page might be more useful https://docs.unity3d.com/2018.3/Documentation/Manual/android-sdksetup.html
You probably haven’t installed build tools and platform tools. Note that SDK consists of 4 parts: “tools”, “platform api”, “platform tools” and “build tools”. What is installed by default is just “tools” part. As you’re saying that you have installed “android 10.0 (Q)”, I suspect that is platform api for android 10 (which is "platforms;android–29"). Then you still need to install “platform tools” and “build tools” from the SDK manager in Android Studio. These tools are in a separate tab than the platform APIs. Notice the “SDK Tools” tab selected in this screenshot instead of the “SDK Platforms” tab: https://developer.android.com/studio/images/sdk-manager-tools_2x.png
Thanks for the reply I’m finding it difficult to use the command prompt I have already tried as shown in the screen shot. I’ve recorded a short video showing and explaining what I’ve done so you can see if I’m missing anything as I think I’ve already tried exactly what you;ve suggested
Thanks for providing a video. It seems that you have all the required components installed, however you have installed a release candidate of the build tools. Unity had issues detecting release candidate tools and that was fixed some time ago, but I am not sure if it was fixed in 2018.4. Based on your video, I would guess that the issue is still there in 2018.4 and you would be able to avoid it by uninstalling rc version and installing the latest non-rc version. In the Android Sdk Manager, there is a checkbox called “Show Package Details” in the bottom right corner. Click it, then install Android SDK Build-Tools version 29.0.3 and uninstall version 30.0.0-rc1. That should allow Unity to detect the SDK.
Hi thanks for the instructions again, I’ve followed them but still having the same issue, I’ve recorded another video that displays what I’ve done so you can see if I’ve done anything incorrectly.
–
Also on another note I’m not sure if this is the right thread to post this but I was having another android deployment issue with 2019.3 and is one of the reasons I went to 2018.4 to try and avoid issues. The SDK works for that version as it comes with unity but no one has replied to it could you or someone from the unity team check this post out please:
Hi again. Thanks for being persistent and for providing detailed description (in a form of a video). Finally I’ve been able to reproduce this on my machine and this is a worrying thing. The issue you’ve encountered will be reproducible with all Unity versions and will require a fix on our side. However there is a workaround you can use for now. The problem is that the new SDK manager, which is included in Android Studio 3.6 does not install “SDK Tools” as it considers them obsolete. However Unity checks for the presence of these tools to determine if SDK was installed. This is a recent change and as I’ve said will require fixes on our side, however that also means you can work around it by installing the SDK Tools yourself. In the SDK manager uncheck the “Hide Obsolete Packages” checkbox and install “Android SDK Tools (Obsolete)” component. This will allow Unity to detect the SDK for now.
Thank you once again for helping to detect this change in Android SDK.
That made ./avdmanager list target -c run without errors in Terminal.
So, avdmanager runs fine in the Terminal with the environment variable: JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home
but not with: JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-12.0.1.jdk/Contents/Home
Unity 2018.4.22 did still throw the error for avdmanager so it must be using another version of Java. I guess something have happened when updating Android Studio to 3.6.3.
Changed the jdk path from using embedded jdk, to use the latest jdk from Unity 2019:
/Applications/Unity/Hub/Editor/2019.3.13f1/PlaybackEngines/AndroidPlayer/OpenJDK
The SDK is also pointing to the one from 2019.3.13.