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 /
  • Help Room /
avatar image
4
Question by Octavic · Dec 09, 2016 at 02:57 PM · androidcoroutinegoogle

Android Unable to merge android manifest Error

I created an empty project and imported the google library for CardBoard VR, then when I try to build I get this error:

 CommandInvokationFailure: Unable to merge android manifests. See the Console for more details. 
 C:/Program Files/Java/jdk1.8.0_111\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/Users/Yifei/AppData/Local/Android/sdk\tools" -Dfile.encoding=UTF8 -jar "D:\Programs\Unity2\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -
 
 stderr[
 
 ]
 mp\StagingArea\AndroidManifest-main.xml:18, E:\Programming\Unity\CardBoardTest2\Temp\StagingArea\android-libraries\gvr-permissionsupport-release\AndroidManifest.xml:3] Main manifest has <uses-sdk android:targetSdkVersion='23'> but library uses targetSdkVersion='24'
 ]
 exit code: 1
 UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
 UnityEditor.Android.AndroidSDKTools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
 UnityEditor.Android.AndroidSDKTools.RunCommandSafe (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
 UnityEditor.HostView:OnGUI()

I'm using 5.5.0f3 and the newest Google SDK for CardBoard. I have also updated my Android to API 23, but the problem persists

Comment
Add comment · Show 6
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 irlab · Dec 23, 2016 at 11:01 PM 1
Share

ps I also stepped back to GVR 1.0 and was able to build. You can get GVR 1.0 here:

https://github.com/googlevr/gvr-unity-sdk/releases

avatar image JulianFiol irlab · Dec 23, 2016 at 11:19 PM 0
Share

thx ! i'll try with this one :)

avatar image irlab JulianFiol · Dec 25, 2016 at 06:31 PM 0
Share

Actually, it fixed the not-being-able-to-build problem; however, the android app that i built doesn't run at all on my Nexus 5x; crashes immediately.

So back to the drawing board, still need a way to build properly with the latest GVR libs and Unity 5.5.

Anyone succeeding?

Show more comments
avatar image yoyo696 · Dec 29, 2016 at 09:10 PM 0
Share

$$anonymous$$e too HAVE THE SA$$anonymous$$E PROBLE$$anonymous$$.

avatar image Kubic75 · Jan 08, 2017 at 09:34 AM 0
Share

Same problem. I have installed latest Google SD$$anonymous$$ (Level25) but the highest available in Unity here is Level22. Why?

9 Replies

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

Answer by liortal · Dec 09, 2016 at 09:24 PM

In the final .APK package, there's only a single (1) AndroidManifest.

When building your project for Android, Unity uses a "main manifest" (default pre-made one, or a custom one, provided by you under Assets/Plugins/Android)i. If you're adding any other plugin libraries, Unity will merge all manifests together to form a single, merged manifest for the built .APK.

In case you define multiple conflicting entries (in the main manifest vs. library manifests), Unity will generate an error such as the one you're getting.

The error usually contains the root cause for failure, along with the paths of the manifest file).

In your case:

Main manifest has android:targetSdkVersion='23'> but library uses targetSdkVersion='24'

Your library (Cardboard VR) specifies that the target Android SDK version that your game is compiled with is 24, but you have defined this to be 23 (in your Player Settings). There's no automatic way that Unity could merge these values together to decide which is the correct value.

The solution:

set your minimal SDK version (Under Player Settings -> Other Settings) to 24. If this is not possible, you'd have to create a custom AndroidManifest.xml and place it under Assets/Plugins/Android.

Once your main manifest matches the targetSDKVersion of the library your build should succeed.

Note: in case you're still not able to resolve the issue yourself, please note that I offer professional services for resolving this kind of Android build issues. More info can be found in this link.

Comment
Add comment · Show 9 · 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 Octavic · Dec 11, 2016 at 01:23 AM 0
Share

That fixed the problem, thank you so much!

avatar image unitynovice5 · Feb 04, 2017 at 11:37 PM 0
Share

Thank You! I lost hours/days trying to resolve this; the "player settings" solution solved multiple problems. Thanks, LIOTAL.

avatar image thaMorganic · Jul 21, 2017 at 11:52 PM 0
Share

It worked. Thanks a lot!

avatar image ajayajayaj · Sep 14, 2017 at 03:33 PM 1
Share

The plugin Android $$anonymous$$anifest might be located under Assets/GoogleVR/Plugins/Android

Also, you have to edit it in the Daydream and Cardboard manifests

avatar image unity_5vV6K89v6pLIlg · Jan 05, 2018 at 05:50 AM 0
Share

That fixed the problem, thank you so much!

Show more comments
avatar image
6

Answer by dmcneely · Jan 04, 2017 at 03:29 PM

@irlab -- I only changed one thing in one of the xml files and it worked for me. This one: AndroidManifest.xml in the project folder\Assets\Plugins\Android. I changed the android:targetSdkVersion="22" to be "24". So android:targetSdkVersion="24". This worked fine and I can now build.

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 TheGame · Jan 14, 2017 at 10:31 AM 0
Share

Worked for me. Thanks

avatar image
1

Answer by davebuchhofer · Jan 26, 2017 at 06:39 PM

I've seen this error a lot, the easiest way to find out what is causing it is to browse to the \Temp\StagingArea\android-libraries\ and check which plugins include internal manifests.

The Gvr sdk 1.10 added the gvr-permissionsupport-release plugin, per https://developers.google.com/vr/unity/release-notes I'm taking that as PermissionsDemo (Daydream only)

If, like me, you're trying to support both daydream and cardboard from the same project prior to 5.6, The options are: add targetSdk of 24 to your manifest, or remove this file from cardboard builds, and leave it in daydream builds.

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 michaelgold · Dec 10, 2016 at 09:33 PM

Downgrading GVR to version 1.0 fixed this for me.

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 HiteshSharma · Dec 15, 2016 at 01:27 PM 0
Share

How did you downgrade the SD$$anonymous$$? I couldn't find older versions anywhere.

avatar image JulianFiol · Dec 23, 2016 at 02:51 PM 0
Share

Hi, michaelgold, could you send me the GVR 1.0 for unity please, I can't find it on the net :'( Thanks ! :)

avatar image irlab · Dec 23, 2016 at 10:20 PM 0
Share

I have the same exact error as @Octavic; i'm using Unity 5.5.0f3 and the latest Google VR library as of today. I understand @liortal's suggestion, but it is also not solving my problem.

It is actually not clear where Unity is getting these $$anonymous$$imum SD$$anonymous$$ versions from:

$$anonymous$$y understanding is that:

-"main manifest" is set with the Player settings > Other Options The highest "$$anonymous$$imimum API Level " that I can select in Unity 5.5.0f3 under Player Settings is "Android 5.1 'Lollipop' (API Level 22)".

-"library manifest" for the latest GoogleVR plugin is under Assets>Plugins>Android>Andoird$$anonymous$$anifest-Cardboard.xml This file indicates that target level is '22' in line 35:

 <uses-sdk android:$$anonymous$$SdkVersion="19" android:targetSdkVersion="22" />

So it is very strange that the build error says the main manifest is at 23 and the library manifest at 24; neither seem to be at 23 or 24!

There are two other Android$$anonymous$$anifest.xml files that may be relevant: -/Applications/Unity/PlaybackEngines/AndroidPlayer/Apk/Android$$anonymous$$anifest.xml (this file doesn't indicate $$anonymous$$imum api target levels)


-~/Library/Android/sdk/tools/apps/SD$$anonymous$$Controller/Android$$anonymous$$anifest.xml (this one indicates [android:$$anonymous$$SdkVersion="19"] and [android:targetSdkVersion="22"]

I would LOVE to know where unity is getting 23 and 24 as target levels; they don't seem to be in ANY of my Android$$anonymous$$anifest.xml files!

avatar image michaelgold · Dec 24, 2016 at 01:52 PM 2
Share

Here is the Unity package that I used:

https://www.dropbox.com/s/2q7x1qo628rbcy0/GoogleVRForUnity-1.0.unitypackage?dl=0

avatar image JulianFiol michaelgold · Dec 25, 2016 at 10:01 PM 0
Share

Thanks, I'll try with this one too :)

avatar image JulianFiol michaelgold · Jan 04, 2017 at 03:19 PM 0
Share

Yes ! It works ! thx :)

avatar image JulianFiol · Jan 04, 2017 at 03:20 PM 0
Share
  1. fixed this for me too :)

avatar image
0

Answer by rajmoor · Jan 03, 2017 at 05:20 PM

Downgrading to 1.0 did it for me as well.

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
  • 1
  • 2
  • ›

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

148 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 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

I made a build using asset delivery and when I try to put it on the play console it gives me the following error 0 Answers

Firebase Auth not working as is should 0 Answers

How to move the UI down when an ad banner appears 0 Answers

Google VR (Cardboard) don't work with Render Pipeline Asset. 0 Answers

Unity Google Mobile Ads (AdMob) not showing after building app for android 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