Error: Android SDK does not include any platforms!

Hello all,

When trying to create a default, simple scene and push it to my Nexus One I get the following error and no APK is generated. I am pretty sure I have the Android SDK installed properly as I can build and deploy native and dalvik APKs via Eclipse.

This is a Windows 7 x64 System running Unity3D Pro 3.0.0f5 (51258).

The steps to reproduce are fairly straightforward:

  1. Create a New Project
  2. Open File > Build Settings…
  3. Select Android as the Platform and select the Build button.
  4. Save the APK file.

The following Error is generated in the status bar and appears in the Editor Log:
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 2.2 (API level 8)

Unloading 281 unused Assets to reduce memory usage. Loaded Objects now: 788.
System memory in use: 186.5 MB.
Unloading 12 Unused Serialized files (Serialized files now loaded: 2 / Dirty serialized files: 2)
Available Android targets:
id: 1 or “android-8”
Name: Android 2.2
Type: Platform
API level: 8
Revision: 2
Skins: HVGA (default), QVGA, WQVGA400, WQVGA432, WVGA800, WVGA854
id: 2 or “Google Inc.:Google APIs:8”
Name: Google APIs
Type: Add-On
Vendor: Google Inc.
Revision: 2
Description: Android + Google APIs
Based on Android 2.2 (API level 8)
Libraries:

  • com.google.android.maps (maps.jar)
    API for Google Maps
    Skins: WVGA854, WQVGA400, HVGA (default), WQVGA432, WVGA800, QVGA

UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:LogError(Object)
UnityEditor.PostprocessBuildPlayer:GetAndroidPlatformTools(String, String, String, String) (at E:\BuildAgent\work\68355d6e5d19d587\Editor\Mono\PostprocessBuildPlayer.cs:858)
UnityEditor.PostprocessBuildPlayer:PostprocessAndroidPlayer(BuildTarget, String, String, String, String, String, String, iPhoneBuildSettings, BuildOptions) (at E:\BuildAgent\work\68355d6e5d19d587\Editor\Mono\PostprocessBuildPlayer.cs:1169)
UnityEditor.PostprocessBuildPlayer:Postprocess(BuildTarget, String, String, String, iPhoneBuildSettings, Int32, Int32, String, String, BuildOptions, RuntimeClassRegistry) (at E:\BuildAgent\work\68355d6e5d19d587\Editor\Mono\PostprocessBuildPlayer.cs:353)
UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck(String[ ], String, BuildTarget, BuildOptions)
UnityEditor.BuildPlayerWindow:BuildPlayerWithDefaultSettings(Boolean, BuildOptions) (at E:\BuildAgent\work\68355d6e5d19d587\Editor\Mono\BuildPlayerWindow.cs:289)
UnityEditor.BuildPlayerWindow:ShowBuildTargetSettings() (at E:\BuildAgent\work\68355d6e5d19d587\Editor\Mono\BuildPlayerWindow.cs:805)
UnityEditor.BuildPlayerWindow:OnGUI() (at E:\BuildAgent\work\68355d6e5d19d587\Editor\Mono\BuildPlayerWindow.cs:644)
System.Reflection.MonoMethod:InternalInvoke(Object, Object[ ], Exception)
System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[ ], CultureInfo)
System.Reflection.MethodBase:Invoke(Object, Object[ ])
UnityEditor.HostView:Invoke(String, Object) (at E:\BuildAgent\work\68355d6e5d19d587\Editor\Mono\GUI\DockArea.cs:212)
UnityEditor.HostView:Invoke(String) (at E:\BuildAgent\work\68355d6e5d19d587\Editor\Mono\GUI\DockArea.cs:205)
UnityEditor.HostView:OnGUI() (at E:\BuildAgent\work\68355d6e5d19d587\Editor\Mono\GUI\DockArea.cs:106)

(Filename: E:/BuildAgent/work/68355d6e5d19d587/Editor/Mono/PostprocessBuildPlayer.cs Line: 858)

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 2.2 (API level 8)

  • Has anyone else seen this?

  • When running the Android SDK Manager, it pretty clearly shows that I have API 8 installed and the platform is available in the SDK directory.

The http://unity3d.com/support/documentation/Manual/android-bugreporting.html link doesn’t seem to point to anywhere, so I am posting here.

Hmm, have you tried installed all of the 2.x platforms just to see if it works?

I initially had 2.1 installed as well as 2.2 with the same error and thought Unity3D might be getting confused with multiple versions, so I uninstalled API level 7. Before I removed 2.1, it was showing android-7 and android-8 in the platforms directory of the SDK - now just android-8.

The only reason for it to fail (afaik) would be if the ‘aapt.exe’ is missing from the /platforms/android-8/tools directory. Can you do a ‘dir /s’ from and attach it?

One other thing I forgot to mention, whenever I try to do an Android build and it fails - Unity3D also opens up Windows Explorer to my home directory.

Anyhow, here is the command-line output:

C:\SDK\android-sdk-windows\platforms\android-8\tools>dir /s
Volume in drive C has no label.
Volume Serial Number is D0F2-44E5

Directory of C:\SDK\android-sdk-windows\platforms\android-8\tools

07/08/2010 02:18 PM .
07/08/2010 02:18 PM …
07/08/2010 02:18 PM 5,442,692 aapt.exe
07/08/2010 02:18 PM 1,526,474 aidl.exe
07/08/2010 02:18 PM 500,870 dexdump.exe
07/08/2010 02:18 PM 2,598 dx.bat
07/08/2010 02:18 PM lib
07/08/2010 02:18 PM 10,800 NOTICE.txt
5 File(s) 7,483,434 bytes

Directory of C:\SDK\android-sdk-windows\platforms\android-8\tools\lib

07/08/2010 02:18 PM .
07/08/2010 02:18 PM …
07/08/2010 02:18 PM 747,871 dx.jar
1 File(s) 747,871 bytes

Total Files Listed:
6 File(s) 8,231,305 bytes
5 Dir(s) 66,150,285,312 bytes free

I have tons more listed in those directories. In the SDK Manager, is something called “Android SDK Tools, revision 7” installed?

EDIT: Sorry, I have poor reading comprehension apparently. Was looking in the base tools directory. :frowning:

As I mentioned in the previous post, I had it installed and encountered the error. I uninstalled it and still have the issue.

I don’t know why you would have more files in those directories… but these are sub directories of the specific platform within the SDK, not the whole SDK itself. The contents look appropriate to me and, more importantly, I have no issues building general Android applications from the command line or from the Eclipse IDE.

I finally resolved this issue tonight.

In short, the AndroidSdkRoot value in the registry was not set to the actual path of the SDK - it was empty. I was kinda clued into this because Unity3D would open my home directory in Explorer. Once I set it, things seem to come together.

Not sure why this value got out of whack on one system, but I had updated from several beta into release versions.

I hope this solution is useful to others.

That would indicate that the editor was not able to write the registry; was it running with limited privileges? Does it reappear (empty or set) if you completely remove the registry key for AndroidSdkRoot?

Sill ain’t working for me. Although I wrote the path in the registry, I get the same error, and Unity still opens up the home directory.

I installed Android SDK r7 on my WinXP SP3 (under local administrator account). In that case I can built for Android. In the registry the AndroidSDKRoot value is set to the actual installation path of the SDK:
HKEY_CURRENT_USER\Software\Unity Technologies\Unity Editor 3.x\AndroidSdkRoot = D:/android-sdk-windows
HKEY_USERS\S-1-5-21-2230105446-869474077-2002578023-2471\Software\Unity Technologies\Unity Editor 3.x\AndroidSdkRoot = D:/android-sdk-windows

but when I log in as a limited privileges domain user I get the same error as described in this thread. When I check the registry the
HKEY_USERS\S-1-5-21-2230105446-869474077-2002578023-2471\Software\Unity Technologies\Unity Editor 3.x\AndroidSdkRoot
is reset to an empty value! But the registry entry at
HKEY_CURRENT_USER\Software\Unity Technologies\Unity Editor 3.x\AndroidSdkRoot
still has got the correct path.

When I delete the registry key
HKEY_USERS\S-1-5-21-2230105446-869474077-2002578023-2471\Software\Unity Technologies\Unity Editor 3.x\AndroidSdkRoot

and I try to build in Unity it first asks me the location of the SDK. After that it fails with the same error message. The deleted registry key is recreated (with an empty pathvalue)!

I am clueless!

Did some more testing. If you put the Unity project on a local harddisc (for example D:\unity testproject) then the building works! However if you create the unity project on your homedir which is located on our server \server\HOME$\user\My Documents\New Unity Project
than the building fails with “Android SDK does not include any platforms! Did you run Android SDK setup to install the platform(s)?” and I get an Windows Explorer error message saying “The path \server\HOME$\user\My Documents\New Unity Project\test.apk does not exist or is not a directory.” See screenshot.
When I put the project on my server using a mapped networkdrive M: it works! So it’s clearly that Unity and/or Android SDK doesn’t work with UNC paths. My guess it’s Android SDK because I also can’t start my AVD when put on a server. (It will let me create it though). I get the following error when starting the AVD: “emulator: ERROR: unknown virtual device name: ‘test’
emulator: could not find virtual device named ‘test’”.

Unity does not support network shares to my knowledge. So yes, you cannot store your project on a network share

I’m having the same problem, I keep getting the message that the Android SDK does not include any platforms. I tried everything mentioned in this thread.

I’m running Windows 7 64 bit and using Unity 3 verion 3.1.0f3 (54715) and using a HTS Desire.

Anyone has a solution?

tonsleegers, what platforms have you installed using the installer tool from sdk?

SDK platform Android 2.2, API 8, revision 2 is the only one

Could you please try to deploy any Google samples to your device?

there’s something odd with this message…

I tried to make the Hello World example explained in the documentation in Eclipse IDE with de ATD plugin and that worked just fine.

I made a new Unity project and now it is just working fine, i guess my project is just corrupt or something

use SDK Platform Android 2.2 API 8 ,it just be ok
if i use use SDK Platform Android 2.3 API 9,it will be this error:
Android SDK does not include any platforms! Did you run Android SDK setup to install the platform(s)?