• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by cyrillegedoria · Oct 16, 2013 at 03:09 AM · android sdk

unable to locate android sdk

Error building Player: Exception: android (invokation failed) ERROR: unknown error cmd:android list target -c stdout; stderr: Exception in thread "main" java.lang.NullPointerException at SDKMain.main(SDKMain.java:62)

I want to build an .apk file but unity is looking for android-sdk-windows, ihave a sdk bu i got that error..

pls. help

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

4 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Guzaii · Oct 16, 2013 at 04:23 PM

Here is what i did: I downloaded this:

 http://developer.android.com/sdk/index.html
 
 Then i presses Download.
 
 I took the SDK folder from the .zip, and placed it on my Desktop (you dont have to do this, thats just how i did it).
 And then i went to Edit > Preferences > Extended Tools.
 And then i choose the folder on my desktop that was named SDK.
 
 Then after i made the game (didnt export it yet).
 Then i went in File > Build Settings...
 Choose the Android, and clicked "Switch Platform", waited for that, and pressed "Build".
 Then choose where i wanted the .apk file to be (I had my phone plugged to the computer).
 I choose my phone, selected the Internal SD, and pressed "Save".
 
 Then i went on my Phone, used a File Manager to find the file. and then i ran the program.
 My phone installed, and i was able to test/play the game.

I hope this can help you with how you do it. I once had trouble with it myself :)

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by ungstef · Jan 26, 2017 at 04:25 PM

Hi everybody,

If I choose the folder where Android Studio (https://developer.android.com/studio/index.html) is installed, there is an error too. Maybe I installed something wrong? Then I tried to insert the path like you said it, Guzaii, but it dosn't work either.

Have anybody another alternative?

Ist this path where Android Studio is installed (C:\Program Files\Android\AndroidStudio) not the right path?

I don't know what to do. Thank you in advance :)

EDIT: Problem is fixed. I insert the wrong path. I didn't know that Android Studio installed the SDK on another path than the Android Studio programm files. May it helps other people who have the same problem :)

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image DTFun · Feb 22, 2018 at 09:28 PM 0
Share

Thanks for this. For everyone else, the path is more like C:\Users\USER\AppData\Local\Android...

https://answers.unity.com/answers/1184293/view.html

avatar image
1

Answer by bluehorizons · Feb 22, 2017 at 12:16 PM

If you are a newb at unity like me then you get stuck because you dont realise you still need to download the android sdk, just downloading the android plugin is not the complete job. N3K https://www.youtube.com/watch?v=qjYMHdhJSiE goes through it step by step. hope that helps

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by jmaestro · Jun 30, 2017 at 04:15 PM

Hi, @cyrillegedoria. In my experience, it all has to do with having a version of Android SDK and tools which is compatible with Unity.

I have managed to sort out this exact same error by using the following combination of products:

Unity 5.3.5f1

Path | Version | Description | Location

build-tools;23.0.2 | 23.0.2 | Android SDK Build-Tools 23.0.2 | build-tools/23.0.2/
emulator | 26.0.3 | Android Emulator | emulator/
patcher;v4 | 1 | SDK Patch Applier v4 | patcher/v4/
platform-tools | 26.0.0 | Android SDK Platform-Tools | platform-tools/
platforms;android-20 | 2 | Android SDK Platform 20 | platforms/android-20/ platforms;android-23 | 3 | Android SDK Platform 23 | platforms/android-23/

tools | 24.4.1 | Android SDK Tools | tools/

Hope this helps.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

20 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Is there any reaction plan for Android 6.0? 1 Answer

Unity Android setup question 1 Answer

android sdk manager is deprecated. How do i install packages? 0 Answers

SDK Platform Tools version 0.0.0 < 23.0.0 3 Answers

CommandInvokationFailure: Gradle build failed when build android apk 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges