Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • 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 TheShadyColombian · Nov 11, 2016 at 05:55 PM · androidbuildsdkandroid-sdk

Unable to build to Android

When I try to build to android, the build succeeds... sort of. The build is created but if I build and run or try to install the app manually, I get the following error:

 stderr[
 Failed to install /Users/TheShadyColombian/Portfolio/Unity/Projects/1D/Temp/StagingArea/Package.apk: Failure [-26: Package com.JuanCallejas.OneDimension new target SDK 19 doesn't support runtime permissions but the old target SDK 23 does.]
 ]

However, installing via the standard installation GUI just says the package is corrupted.

Here is what the console errors are:

Unity Screenshot

According to the error, I should try using a different version of the Android SDK (perhaps 23). The weird thing is that I've selected SDK 23 in the played build settings, and I've even deleted SDK 19, yet it still says I'm using SDK 19. I've verified that the SDKs I am using and/or deleting share the same directory path.

This is for an app I've already published, and needs an urgent update, so any help is very appreciated.

EDIT: It turns out I've actually just changed what API I'm using, not the SDK. How can I change the SDK to 23 or 25?

screen-shot-2016-11-11-at-124932-pm.png (206.1 kB)
Comment
Add comment · Show 7
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 Desoxi · Nov 11, 2016 at 06:02 PM 0
Share

How does your path look like under Edit->Preferences->External Tools? Normally it should look something like this:

D:/Users/Noname/AppData/Local/Android/android-sdk

I had a problem similar to this in which my path was somehow changed to something else.

Also, which folders are present in your build-tools folder under:

D:\Users\Noname\AppData\Local\Android\android-sdk\build-tools ? $$anonymous$$aybe you just have to update everything via the SD$$anonymous$$ manager?

avatar image TheShadyColombian Desoxi · Nov 11, 2016 at 06:09 PM 0
Share

I should've clarified that I am using the $$anonymous$$ac editor, but this still applies in a slightly different way. I used the SD$$anonymous$$ $$anonymous$$anager a few times to verify that I have the right SD$$anonymous$$ tools i need.

I have Android SD$$anonymous$$ Build-Tools v25 and v24 and Platform Tools v25 as well as API 23, 24, and 15. Also, I just realized the error says I'm using SD$$anonymous$$ 23 but I'm actually just changing the API, not the SD$$anonymous$$. How do I tell unity to use SD$$anonymous$$ 25 (the latest I have) ins$$anonymous$$d of 19... which I don't even know how it got?

avatar image Desoxi · Nov 11, 2016 at 07:38 PM 0
Share

Hmm, what did you choose as install location in the build settings?

avatar image TheShadyColombian Desoxi · Nov 12, 2016 at 12:38 AM 0
Share

Install location? The build settings is the window with the list of scenes and the platforms that I can build for, right? The only thing related to a location is the build location, which I doubt impacts the outcome. Right now, it's just a folder in my desktop (/Users/TheShadyColombian/Desktop/AP$$anonymous$$s/1D\ Test\ Build.apk)

avatar image Desoxi TheShadyColombian · Nov 12, 2016 at 01:02 AM 0
Share

No i mean the install location in the player settings:

alt text

Try setting it to automatic maybe. I dont know the exact solution, that why im trying to give you some ideas which could help :)

playersettings.png (53.5 kB)
Show more comments

2 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by Desoxi · Nov 12, 2016 at 01:06 AM

Ah and try to delete or move out every folder in Android\android-sdk\build-tools but one (the one with the highest version number). It should be somewhere in the same level like the path to the android sdk you put into your unity preferences.

Comment
Add comment · Show 7 · 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 TheShadyColombian · Nov 12, 2016 at 01:11 AM 0
Share

Alright, but the only ones I have there are 0.0.24 and 0.0.25. I'll delete 0.0.24 and I'll give it a shot

avatar image TheShadyColombian · Nov 12, 2016 at 01:15 AM 0
Share

Nope, same error, and It's still trying to use SD$$anonymous$$ 19. I don't know what SD$$anonymous$$ it's talking about

avatar image Desoxi TheShadyColombian · Nov 12, 2016 at 01:23 AM 1
Share

Hm... and you are sure that you did not accidentally install the sdk twice? Which version does the sdk manager show you? There should be a "SD$$anonymous$$ $$anonymous$$anager" executable in the sdk path you put into your preferences. Start it and check the values, update several times as the sdk manager maybe updates itself too, then you have to start it again and run another update cycle.

avatar image TheShadyColombian Desoxi · Nov 12, 2016 at 01:34 AM 0
Share

Everything's up to date. How can I check if there are any doubles of the SD$$anonymous$$?

avatar image Desoxi · Nov 12, 2016 at 01:06 PM 1
Share

Are you uninstalling the app before you install it on the device? Or do you update it through build&run? It could help to build the app as a single apk and then manually deploy it on the device.

avatar image TheShadyColombian Desoxi · Nov 13, 2016 at 08:10 PM 0
Share

Huh.... weird. I guess I just had to uninstall it, or something happened since the last time I tried it. I've actually tried using the normal AP$$anonymous$$ installer a few times before, but it said the package was corrupted or something, but now it works. Now I gotta fix the bigger problem, but I'm glad this is fixed. Thanks a lot! ^_^

avatar image Desoxi TheShadyColombian · Nov 14, 2016 at 02:19 PM 0
Share

Glad i could help :)

avatar image
0

Answer by hMark · Jul 28, 2017 at 07:43 AM

I have detailed article about clean Unity/AndroidSDK installation which also solves this issue: http://devlog.markhlavac.com/2017/06/30/installing-android-sdk-for-unity3d-using-sdk-tools-and-cli/

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.

Follow this Question

Answers Answers and Comments

103 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 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 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 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 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 avatar image avatar image avatar image

Related Questions

Java error when building 1 Answer

Android - Building Beta Problems. 0 Answers

Android SDK does not include any platforms! 3 Answers

Cannot build for Android 2 Answers

Run by run on android building 1 Answer


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