CommandInvokationFailure failed to re-package resources - Google VR
Hello, I've been troubleshooting this error to no avail. Any help would be greatly appreciated!
CommandInvokationFailure: Failed to re-package resources. C:\Users\Scott\AppData\Local\Android\Sdk\build-tools\25.0.1\aapt.exe package --auto-add-overlay -v -f -m -J "gen" -M "AndroidManifest.xml" -S "res" -I "C:/Users/Scott/AppData/Local/Android/Sdk\platforms\android-23\android.jar" -F bin/resources.ap_ --extra-packages com.google.gvr.permissionsupport:com.google.vr.cardboard:vr.gvr.platform.unity -S "C:\Users\Scott\Desktop\ohmy\Temp\StagingArea\android-libraries\gvr-permissionsupport-release\res" -S "C:\Users\Scott\Desktop\ohmy\Temp\StagingArea\android-libraries\gvr_android_common\res" -S "C:\Users\Scott\Desktop\ohmy\Temp\StagingArea\android-libraries\unitygvractivity\res"
stderr[ AndroidManifest.xml:30: error: No resource identifier found for attribute 'enableVrMode' in package 'android' stdout[ Configurations: (default) Files: AndroidManifest.xml Src: () AndroidManifest.xml ]
There's also a list of "Resource Dirs" Etc. (not sure if I should include this also.)
First I was getting an Error that said "Cannot merge android manifests" I opened the scripts and changed the values to match the API level in the build settings. That error is gone but, now I get this error (mentioned above).
I tried installing and uninstalling different Android SDK Build Tools. but they all give me this same error.
Thanks in advance!
Answer by liortal · Mar 15, 2017 at 05:28 AM
stderr[ AndroidManifest.xml:30: error: No resource identifier found for attribute 'enableVrMode' in package 'android' stdout[ Configurations: (default) Files: AndroidManifest.xml Src: () AndroidManifest.xml ]
You are referencing a resource named enableVrMode in your AndroidManifest.xml (specifically, in line 30), but there is no resource defined with that name.
Hi, thanks so much for your reply!
I just deleted the "Android$$anonymous$$anifest-Daydream" .xml & that error went away.
I already set the "PlayerSettings - $$anonymous$$in API level to "19" because the "Android$$anonymous$$anifest-Cardboard" says $$anonymous$$SD$$anonymous$$Version = 19.. this seemed to get rid of the "Cannot $$anonymous$$erge $$anonymous$$anifests Error"
Then, I get a new error that basically says "SD$$anonymous$$ Level in the Android$$anonymous$$anifest-$$anonymous$$AIN is 23, while the library uses 24.
I can't access the Android$$anonymous$$anifest-$$anonymous$$ain from inside Unity? So, I found it in the project folder and opened it with visual studio, changed the 23 to 24, and saved.
Now, I get another error "$$anonymous$$oving file failed temp/StagingArea/Data/Level0: Access is denied.
I click cancel and I get more UnauthorizedAccessException Errors.
I'm after trying everything in my power, should I just revert to the previous version of Unity?
strong text
Hi, thanks so much for your reply! I have 3 different Android$$anonymous$$anifest.xml's after importing the Google VR package. There's "Android$$anonymous$$anifest", "Android$$anonymous$$anifest-Cardboard", & "Android$$anonymous$$anifest-Daydream".
I deleted the Daydream xml, and the error I was getting seems to be gone. Also the "Android$$anonymous$$anifest" & "Android$$anonymous$$anifest-Cardboard" are identical to each other, I deleted the "Android$$anonymous$$anifest", so now I'm left with just the "Cardboard one".
But now I get this error.
CommandInvokationFailure: Unable to merge android manifests. See the Console for more details. C:\Program Files\Java\jdk1.8.0_74\bin\java.exe -Xmx2048$$anonymous$$ -Dcom.android.sdkmanager.toolsdir="C:/Users/Scott/AppData/Local/Android/Sdk\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -
stderr[
] stdout[ Warning: [Temp\StagingArea\Android$$anonymous$$anifest-main.xml:12, C:\Users\Scott\Desktop\ohmy\Temp\StagingArea\android-libraries\gvr-permissionsupport-release\Android$$anonymous$$anifest.xml:3] $$anonymous$$ain manifest has but library uses targetSdkVersion='24' ] exit code: 1 UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String error$$anonymous$$sg) UnityEditor.Android.AndroidSD$$anonymous$$Tools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memory$$anonymous$$B, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String error$$anonymous$$sg) UnityEditor.Android.AndroidSD$$anonymous$$Tools.RunCommandSafe (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memory$$anonymous$$B, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String error$$anonymous$$sg) UnityEditor.HostView:OnGUI()
I opened the "Android$$anonymous$$anifest-$$anonymous$$ain" and changed the "Target SD$$anonymous$$ version" to 24, like it says to do. But every time I attempt to build it, "Target SD$$anonymous$$ version" reverts to 23 for some reason! Very frustrating. I'm stuck!
Thanks!