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
1
Question by OwlTeaGames · Aug 11, 2017 at 06:52 AM · androidvrbuild-errorsdk

VR Issues with CommandInvokationFailure, exit code 1

CommandInvokationFailure: Unable to merge android manifests. See the Console for more details. C:/Program Files/Java/jdk1.8.0_144\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/Users/owlsntea/AppData/Local/Android/sdk1\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -

stderr[

] stdout[ Warning: [Temp\StagingArea\AndroidManifest-main.xml:12, C:\Users\owlsntea\Desktop\vrtests\New Unity Project 1\Temp\StagingArea\android-libraries\gvr-keyboard\AndroidManifest.xml:2] Main manifest has android:targetSdkVersion='23'> but library uses targetSdkVersion='24' Warning: [Temp\StagingArea\AndroidManifest-main.xml:12, C:\Users\owlsntea\Desktop\vrtests\New Unity Project 1\Temp\StagingArea\android-libraries\gvr-keyboardsupport-release\AndroidManifest.xml:3] Main manifest has android:targetSdkVersion='23'> but library uses targetSdkVersion='24' Warning: [Temp\StagingArea\AndroidManifest-main.xml:12, C:\Users\owlsntea\Desktop\vrtests\New Unity Project 1\Temp\StagingArea\android-libraries\gvr-permissionsupport-release\AndroidManifest.xml:3] Main manifest has 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()

OK!

My goal was simple. Add a small scene, add a VR camera, build for Android, test in Cardboard. No animation, particles, code, etc.

So here is Unity 5.6.0f3. I drop in a few assets, start a build, test on phone, everything's swell! No camera movement, but I haven't added that yet...

But then!

I import GoogleVRForUnity_1.70.0 into the project. Before I even drop the VR camera into the scene, I tempt fate and immediately hit build, yielding three errors. The first two errors tell me I need to specify in my Build that I'm using VR and Cardboard. The third error is the on listed above.

Clear the console, go into personal settings, check VR Supported, enter in my VR Cardboard selection, and attempted to Build Again. The first two errors were gone, but the CommandInvokationFailure was back!

The internet wasn't much help. Plenty of the other errors similar to this exist, and their advice was to make sure I was using various odds and ends- 25.2 tools, NDK10, I followed all of those to the best of my ability... but nothing has worked.

I even tried changing my Java version.

I tried to analyze the error as best I could- I noticed it was upset about my target SDK version, so I opened up my SDK manager, and made sure that Android 6 (23) was the only thing selected. I went into Unity, and checked my external settings.

I have tried using Unity 5.5, 5.6, and the newest 2017, and in each one, I tried multiple combinations of the SDKs.

I have even tried going into C:\Users\owlsntea\Desktop\vrtests\New Unity Project 1\Temp\StagingArea\android-libraries\gvr-permissionsupport-release\AndroidManifest.xml. I changed the 19 and 24 to 23 and 23. I changed it also for the keyboard, and keyboard support, and it broke even harder.

I just want to find the right combo.

If you've done it, please don't try to fix my problem. Just tell me which Unity, Java, SDK and NDK I need. This is my third full 12-hour or more day of trying to fix it. I've read hundreds of articles. I even read the manual and release notes for each version of Unity AND Android.

At this point, I feel like it just hates me. Three full days wasted because I always feel like asking for help is just a convoluted, snarkier version of using google search. So yeah, I RTFMs and sacrificed three days of my life. Please somebody hold my pencil in my hand and write my name for me! Hugs and kisses, OwlTeaGames!

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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by liortal · Aug 24, 2017 at 11:52 AM

According to the error, your project (the "main manifest") is configured to use targetSdkVersion 23, but a library (plugin) declares it must use targetSdkVersion 24, which causes a conflict and so the manifests cannot be all merged into a single one to form the APK.

I don't remember exactly how it works in Unity 5.5, 5.6 and 2017 (since the behavior changed at some point), but the targetSdkVersion was determined in different ways:

  1. If you have a "main manifest", e.g: Assets/Plugins/Android/AndroidManifest.xml, the version will be picked up from there.

  2. If there's no "main manifest", Unity will pick up the latest version from the Android SDK you have available.

  3. At some Unity version, they added the option to manually specify this value directly in the Player settings.

I suggest you to try and specify targetSdkVersion to be 24 (either via the Unity UI or from the manifest file) and see if that works.

Modifying files under Temp/StagingArea won't help, as this folder is being regenerated with every new build that you make.

NOTE: In case you're not able to solve this issue yourself, please be advised that i offer a professional service for consulting on these exact type of cases. Feel free to contact me and i will assist you.

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

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

Related Questions

[Android VR app build error] CommandInvokationFailure: Gradle build failed. 0 Answers

Unable to merge Android manifests. (5.6.0p3) 2 Answers

Error while saving blame file 6 Answers

Unable to build Google VR app for Android 0 Answers

Build error with VR app for google cardboard 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