Hello everyone,
When i submitted my game to Google Play it shows that my game must support at least Android API 29. While my Unity version only support Up to Android API 28. So, I updated my Unity Editor to the latest LTS version and also updated NDK, SDK etc from Unity Hub. But problem not solved. So, I downloaded latest SDK from Android Studio and changed my SDK path to C:\Users\Hi\AppData\Local\Android\Sdk in External Tools
But it still not showing 29 and 30.
Other than that I am getting these warnings in Console:
1)
Observed package id ‘tools’ in inconsistent location ‘C:\Users\Hi\AppData\Local\Android\Sdk\tempToolsDir’ (Expected ‘C:\Users\Hi\AppData\Local\Android\Sdk\tools’)
System.Reflection.MethodBase:Invoke(Object, Object[ ])
File C:\Users\Hi.android\repositories.cfg could not be loaded.
System.Threading.ThreadHelper:ThreadStart()
and in External Tools my NDK is also showing warning that “you are missing the recommended Android NDK…” while I downloaded everything from Unity Hub.
Please help.
I have solved in a different way with these steps:
Add support of android in unity. This will make a SDK in the unity editor.
Install Android Studio with new SDK. Install android platforms which you want to use in the unity. Also install android build tools of the highest API level.
In the new SDK, the platforms which you have installed from android studio copy these platform folders and put these folders in unity android SDK. Also copy the build tools folder from new SDK and paste it in the unity android SDK.
Also had a problem with updating Android SDK to version 30 in Unity. In my case I had to enter the computer admin PW 3 times, before Unity looped back into the message “update Android SDK…”. No error messages, it was just not able to update. Solution: I went to “preferences”, copied the location of the SDK tools (keep default location by Unity) and opened the location in the file explorer of my compter. From there I opened the folder “SDK” and then “platforms”. It had me to enter my admin PW, which I did. After that, somehow Unity was able to access the folder when I wanted to build the project and update the SDK using Unity’s link. Hope it helps.
In PowerShell enter your unity editor “SDK\tools\bin” directory. cd "C:\Program Files\Unity\Hub\Editor\2020.3.19f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\bin"
Run “sdkmanager.bat” with “platforms” parameter. .\sdkmanager.bat "platforms;android-30"