2
\$\begingroup\$

This question has been asked several times on the Unity answers website, but there's no solid answer to it!

Problem: While trying to build a game for android in Unity, I receive this error:

Android SDK does not include any platforms!

Yet I have all Android platform APIs downloaded.

I've tried all of the suggested solutions:

  • Running Unity as Admin
  • Manually modifying the AndroidSdkRoot registry value
  • Deleting the old android platform folders
  • Reinstalling Android SDK into a folder other than Program Files
  • Reinstalling Unity
  • Recreating the project
  • Renaming "android-sdk" folder to "android-sdk-windows" since that was the default folder name value in the Unity's Browse dialog window.

Some Notes:

  • The Android SDK Home in Preferences value gets reset every time I try to build the project!
  • I'm also not using the Eclipse bundle, I installed Android SDK using the .exe installer.
  • Using Windows 8 Pro x64 (if it makes a difference)

I'm absolutely clueless, but I feel like this is a bug on Unity's side which needs to get fixed. If not, please let me know what I'm doing wrong.

\$\endgroup\$
  • 1
    \$\begingroup\$ You haven't really explained the problem here. What's this question that's been asked several times? \$\endgroup\$ – MichaelHouse Jul 11 '13 at 13:06
  • \$\begingroup\$ Sry. Edited.... \$\endgroup\$ – DarrenVortex Jul 11 '13 at 21:37
1
\$\begingroup\$

Unity seems to suggest it's a three step process which seem to be missing from your list. If not it could be a driver error.

http://docs.unity3d.com/Documentation/Manual/android-GettingStarted.html

Android SDK Setup There are some steps you must follow before you can build and run any code on your Android device. This is true regardless of whether you use Unity or write Android applications from scratch.

  1. Download the Android SDK Go to the Android Developer SDK webpage. Download and unpack the latest Android SDK.

  2. Installing the Android SDK Follow the instructions under Installing the SDK (although you can freely skip the optional parts relating to Eclipse). In step 4 of Installing the SDK be sure to add at least one Android platform with API level equal to or higher than 9 (Platform 2.3 or greater), the Platform Tools, and the USB drivers if you're using Windows.

  3. Get the device recognized by your system This can be tricky, especially under Windows based systems where drivers tend to be a problem. Also, your device may come with additional information or specific drivers from the manufacturer.

For Windows: If the Android device is automatically recognized by the system you still might need to update the drivers with the ones that came with the Android SDK. This is done through the Windows Device Manager.

http://docs.unity3d.com/Documentation/Manual/android-sdksetup.html

Could it be that you have no platform to emulate or run your .apk?

\$\endgroup\$
0
\$\begingroup\$

I've had a lot of trouble with Android SDK and unity. Forgive me if i sound condescending but my suggestions would be to

  • Ensure that you have plenty of platforms installed on Android Studio (SDK Manager)
  • I had some grief with spaces in the URL, my path to the android sdk included spaces, my android sdk is now located here: "C:/AndroidSDK" with platforms 21 - 28 installed.
  • When i once received errors for Android SDK, they were actually pertaining to JDK, im currently using C:/Program Files/Java/jdk1.8.0_161
  • Im also using a reference to NDK which i've put inside of the Android SDK folder
  • Try adding JAVA_HOME to your "Path" in System variables too

Good luck, if i remember what other steps i attempted i'll add them here.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.