How do I get Unity to recognize and use Android SDK platforms?

I’m getting the following error when I try to build a minimal Android app (just a spinning cube, for testing the build pipeline):

Error building Player: UnityException: No platforms found
Android SDK does not include any platforms! Did you run Android SDK setup to install the platform(s)?
Minimum platform required for build is Android 4.0 (API level 14)

The problem is that I do have the API level 14 platform installed. I’ve also installed 32-bit Java as well as the Android SDK (and I purchased and installed the basic Unity Android extension, so I should be able to build).

My environment is Win7 Pro 64-bit SP1. This box is offline (I’ve done offline installs of everything), but as far as I can tell, I’ve installed the SDK successfully (it, at least, thinks it’s installed, and the SDK tools I’ve tried to use directly do work).

I did a lot of searching on the error messages, and I tried several things with no success:

  • Moving the adb executable and DLLs to the tools folder in the SDK;
  • Verifying that the running Java is 32-bit;
  • Making sure there aren’t spaces in the SDK path;
  • Making sure the SDK is not on the C drive;
  • Checking the Unity Android registry entries and trying to manually set them;
  • Playing with the player settings for internet access, install location, and write access;
  • Verifying that my Android device can be seen by the adb tool (“adb devices” works), and that the SDK manager reports the correct platforms and tools are installed.
  • Installing the latest versions of Unity (3.5.5f3), the Android SDK (r20.0.3), and the platform-tools (r12);
  • Removing all SDK platforms except for the API level 14 platform.

What bugs me is that I’m also seeing this in the Unity console after a failed build:

Available Android targets:
----------
id: 1 or "android-14"
     Name: Android 4.0
     Type: Platform
     API level: 14
     Revision: 3
     Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800
     ABIs : no ABIs.

UnityEngine.Debug:LogError(Object)
PostProcessAndroidPlayer:GetAndroidPlatform(String, String) (at C:/BuildAgent/work/d9c061b1c154f5ae/Editor/Mono/BuildPipeline/PostProcessAndroidPlayer.cs:1125)
PostProcessAndroidPlayer:PrepareToolPaths(String) (at C:/BuildAgent/work/d9c061b1c154f5ae/Editor/Mono/BuildPipeline/PostProcessAndroidPlayer.cs:71)
PostProcessAndroidPlayer:PostProcess(BuildTarget, String, String, String, String, String, String, BuildOptions) (at C:/BuildAgent/work/d9c061b1c154f5ae/Editor/Mono/BuildPipeline/PostProcessAndroidPlayer.cs:196)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

It looks like Unity can indeed see the platform I’ve installed; it just can’t use it for some reason, and the “No platforms found” error is just a fall through for another problem.

Any ideas?

this is simple, point the SDK to the android SDK folder as long as youve downloaded the appropriate minimum platform. Then also make sure you have unity pro with android license otherwise it faults and you won’t be able to build android games.
Mainly Click Edit, then Preferences on the dropdown, and then click on the External tools tab in the popup window.where it says Android SDK location I use my external usb for example but my folder hierarchy is as follows and whats selected is after.F:/android-sdk-windows/platforms/android-14/
Then my selected folder is F:/android-sdk-windows

However you also should just make sure that you’ve already created a virtual android machine using the SDK.Since I seen the last part where it says available targets and lists api 14, im assuming its because you dont have an android device plugged in while building or a virtual android or AVD created yet to build to and if you need more assistance you can ask me more.

Hi Philip,

I have the exact same problem on windows7 home premium 64 bit. I’ve tried just about everything you’ve tried. The only reliable fix is reinstalling unity. then you can publish to android once or twice before it forgets the sdk location again.

since I know it publishes fine it can’t be the sdk. What I’ve seen is that the value in preferences > external settings > android sdk actually gets wiped when you click build. so it asks you every time for the location. When you give it it still errors.
a
I’m convinced this is a unity or windows bug since a reinstall of unity fixes it. reinstall of sdk doesn’t. I don’t have this problem on my work machine. that’s using same version of unity but windows 7 64 enterprise. Hence could be a windows thing.

Just sharing case this sheds light on the problem. right now it’s making it impossible to publish to android. I can’t reinstall unity after publishing 3 times to android. that’s stupid.

I think I’ve fixed the issue. May help you too. I ran unity as administrator (right click unity shortcut > Run as administrator). works fine now. Explains why it all works in the office but not at home. I’m admin there but not here.

HTH

All right: I got it working. I did the following:

  • Connected the computer to the internet, and directly installed the Android SDK
  • Bought a Kindle Fire HD 7" and followed Amazon’s instructions for getting it connected as a debugging/developer device

Once I did that, Unity recognized the SDK and built to my device. I still need to try this with my other Android device, but I suspect the issue was my trying to install the SDK offline, and not getting something right, even though I could build and run an AVD.

Thanks all for the help.

If you get a “No Platforms Found” error:

  1. Uninstall the current Android SDK and make sure that you don’t have any more copies of it.

  2. Update Java with an stable version. Bear in mind the latest version shouldn’t have conflicts, but users have experienced problems in the past.

  3. Download a fresh copy of the latest ADT Bundle and install it following instructions, this should configure the development tools correctly:
    Download Android Studio & App Tools - Android Developers

  4. Configure Unity with the installed Android SDK.

If you have problems with the editor read this guide: