Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
1
Question by 00jknight · Dec 08, 2014 at 05:31 PM · android-manifestplayer-settings

How can I build a manifest with android:targetSdkVersion="21"?

I need to have targetSdkVersion="21" in my app. How can I build an APK in unity with this?

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

3 Replies

· Add your reply
  • Sort: 
avatar image
4

Answer by codeage · Jul 29, 2015 at 06:51 AM

You can make a customized AndroidManifest.xml and specify the targetSdkVersion, then save this file in folder ProjectRoot/Assets/Plugins/Android (create the folder if it does not exist). Unity will use this customized manifest file while building/exporting the project.

 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.company.product" android:versionName="1.0.0.1" android:versionCode="1" android:installLocation="auto">
     <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="21" />
     <uses-permission android:name="android.permission.INTERNET" />
     ...
 </manifest>

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 ScorpioGamer · Dec 13, 2015 at 06:11 AM 0
Share

Thank you :)

avatar image
1

Answer by ahmedbenlakhdhar · Dec 08, 2014 at 06:06 PM

You may build a Google Android project by clicking on Export button, after checking the Google Android Project option in the Build Settings.

alt text

After that, in the generated folder, you will find the android-manifest file which you may be able to modify as you like. Then you may perform an usual build to create an apk file for your project.


build.png (44.4 kB)
Comment
Add comment · Show 3 · 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 00jknight · Dec 08, 2014 at 06:34 PM 0
Share

I don't want to change $$anonymous$$SdkVersion, I want to change targetSdkVersion.

avatar image ahmedbenlakhdhar · Dec 08, 2014 at 06:47 PM 0
Share

I am sorry, I didn't notice that. The answer is edited.

avatar image 00jknight · Dec 08, 2014 at 07:05 PM 0
Share

thank you!

avatar image
1

Answer by Dave-Hampson · Mar 31, 2015 at 01:24 PM

Note for 22, if you upgrade your Android SDK to 22, restart Unity and remake your APK it will add targetSdkVersion automatically:

<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="22" />

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

6 People are following this question.

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

Related Questions

Multiple Plugin and AndroidManifest.xml 0 Answers

AndroidManifest.XML Question 0 Answers

Unity Admob Failed to re-package resources 2 Answers

Android Activity launchMode override via AndroidManifest 0 Answers

Android manifest file 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