- Home /
[4.6.1] Why does Unity need Android API 21 for build?
I have latest Android SDK (24.0.2) installed. I have API 10 installed. So everything matches Unity requirements. I have custom AndroidManifest file with minSdkVersion=10 and targetSdkVersion=10
But everytime I try to build apk I get an error saying "Android SDK is missing required platform api. Minimum platform required is Android 5.0 (API level 21)".
Why does it do that? It didn't before and I successfully built my apk without API 21 installed. What changed? Is it Unity requirement or is it Android SDK requirement?
Answer by pako · Dec 22, 2014 at 03:48 PM
As you might already know, API 21 is needed to support Android 5. It appears to be a design decision, since it is mention as a "Fix" in the release notes of 4.6.1 (see 16th item from top of "FIXES"):
http://unity3d.com/unity/whats-new/unity-4.6.1
i.e. "Android: Updated SDK and JDK requirements to match Android 5.0."
See also:
http://developer.android.com/about/versions/android-5.0-changes.html
$$anonymous$$aybe that's the case. But this requirement should be mentioned in $$anonymous$$anual then. Because now it says:
be sure to add at least one Android platform with API level equal to or higher than 9 (Platform 2.3 or greater)
which is not enough according to your info.
I believe the point of having the latest API is to make sure that the Platform and Build tools are up to date.
You can also submit Documentation errors using the Bug Reporter tool in Unity: Click Help $$anonymous$$enu/Report a Bug, and then select "Documentation" from the "Type of Problem" drop-down.
Your answer