Showing results for 
Search instead for 
Did you mean: 

Help to solve error VrActivityTheme - AndroidManifest.xml:4: error: Error: No resource found that

Level 3
Hi Guys,

I need a help to fix the error below.
The project compiles when I a select the SDK "Cardboard" or with out VR Support at unity setting..
But when I select "Oculus" VR support and trying to compile I get the error bellow:

I'm using:
Unity 5.4.2f2-GVR10
Java SDK 1.8.0_101

Thanks for any help

CommandInvokationFailure: Failed to re-package resources.
E:\DADOS_HD_SSD\Android_SDK\build-tools\24.0.2\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "E:/DADOS_HD_SSD/Android_SDK\platforms\android-24\android.jar" -F bin/resources.ap_ --extra-packages com.oculus.Integration -S "E:\DADOS_HD_SSD\VR_Oculus\TesteUnity08\Temp\StagingArea\android-libraries\OVRPlugin\res"

AndroidManifest.xml:4: error: Error: No resource found that matches the given name (at 'theme' with value '@style/VrActivityTheme').


    Src: () E:\DADOS_HD_SSD\VR_Oculus\TesteUnity08\Temp\StagingArea\android-libraries\OVRPlugin\res\values\values.xml
    Src: () AndroidManifest.xml

Resource Dirs:
  Type values
      Src: () E:\DADOS_HD_SSD\VR_Oculus\TesteUnity08\Temp\StagingArea\android-libraries\OVRPlugin\res\values\values.xml
Including resources from package: E:\DADOS_HD_SSD\Android_SDK\platforms\android-24\android.jar
applyFileOverlay for drawable
trying overlaySet Key=app_banner.png
trying overlaySet Key=app_icon.png
applyFileOverlay for layout
applyFileOverlay for anim
applyFileOverlay for animator
applyFileOverlay for interpolator
applyFileOverlay for transition
applyFileOverlay for xml
applyFileOverlay for raw
applyFileOverlay for color
applyFileOverlay for menu
applyFileOverlay for mipmap
Processing image: res\drawable-xhdpi\app_banner.png
Processing image: res\drawable-mdpi\app_icon.png
    (processed image res\drawable-mdpi\app_icon.png: 90% size of source)
    (processed image res\drawable-xhdpi\app_banner.png: 93% size of source)
    (new resource id app_banner from xhdpi-v4\drawable\app_banner.png #generated)
    (new resource id app_icon from mdpi-v4\drawable\app_icon.png #generated)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.PostProcessor.Tasks.TasksCommon.Exec (System.String command, System.String args, System.String workingdir, System.String errorMsg, Int32 retiresOnFailure)


Oculus Staff
Do you have a custom AndroidManifest.xml? Maybe it was added for a different build target or in post processing?

Level 3
Hi @vrdaveb, I don't have any AndroidManifest.xml at this project
Few hours ago I made a simple project at Unity with only a cube and script to spin it.
The project compile when has a VR cardboard support enable, but with Oculus I got this error.
Any idea what should I check or test to fix it ?

Oculus Staff
The version of Unity you're using is customized for Google VR. There is a good chance they modified AndroidManifest.xml handling in a way that's incompatible with Gear VR. Can you use a stock version, such as 5.4.2p2 instead?

Level 3
You are right, I changed for the version 5.4.2f2 and now it is working, thank you for your help.