Android error building player Error: No resource found that matches the given name

Howdy, all;

Unity 5.6b9, during build, build stops with the error output as below. The AndroidManifest.xml Application entry includes a theme element:

  <application android:icon="@drawable/app_icon" android:label="@string/app_name" android:debuggable="false" android:isGame="false" android:theme="@style/VrActivityTheme">

Which seems to be the root of the problem. Is this theme undefined or what am I missing?

CommandInvokationFailure: Failed to re-package resources.
/Users/thompson/Library/Android/sdk/build-tools/25.0.2/aapt package --auto-add-overlay -v -f -m -J "gen" -M "AndroidManifest.xml" -S "res" -I "/Users/thompson/Library/Android/sdk/platforms/android-25/android.jar" -F bin/resources.ap_ --extra-packages com.google.gvr.permissionsupport -S "/Users/thompson/Documents/Development/Mouse Attack Coaster.old/Temp/StagingArea/android-libraries/gvr-permissionsupport-release/res"

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

]
stdout[
Configurations:
 (default)

Files:
  layout/dialog.xml
    Src: () /Users/thompson/Documents/Development/Mouse Attack Coaster.old/Temp/StagingArea/android-libraries/gvr-permissionsupport-release/res/layout/dialog.xml
  values/values.xml
    Src: () /Users/thompson/Documents/Development/Mouse Attack Coaster.old/Temp/StagingArea/android-libraries/gvr-permissionsupport-release/res/values/values.xml
  AndroidManifest.xml
    Src: () AndroidManifest.xml

Resource Dirs:
  Type layout
    layout/dialog.xml
      Src: () /Users/thompson/Documents/Development/Mouse Attack Coaster.old/Temp/StagingArea/android-libraries/gvr-permissionsupport-release/res/layout/dialog.xml
  Type values
    values/values.xml
      Src: () /Users/thompson/Documents/Development/Mouse Attack Coaster.old/Temp/StagingArea/android-libraries/gvr-permissionsupport-release/res/values/values.xml
Including resources from package: /Users/thompson/Library/Android/sdk/platforms/android-25/android.jar
applyFileOverlay for drawable
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-ldpi/app_icon.png
Processing image: res/drawable-mdpi/app_icon.png
Processing image: res/drawable-hdpi/app_icon.png
Processing image: res/drawable-xhdpi/app_icon.png
    (processed image res/drawable-mdpi/app_icon.png: 99% size of source)
Processing image: res/drawable-xxhdpi/app_icon.png
    (processed image res/drawable-ldpi/app_icon.png: 99% size of source)
Processing image: res/drawable-xxxhdpi/app_icon.png
    (processed image res/drawable-hdpi/app_icon.png: 99% size of source)
    (processed image res/drawable-xhdpi/app_icon.png: 99% size of source)
    (processed image res/drawable-xxhdpi/app_icon.png: 99% size of source)
    (processed image res/drawable-xxxhdpi/app_icon.png: 99% size of source)
    (new resource id app_icon from ldpi-v4/drawable/app_icon.png #generated)
    (new resource id app_icon from mdpi-v4/drawable/app_icon.png #generated)
    (new resource id app_icon from hdpi-v4/drawable/app_icon.png #generated)
    (new resource id app_icon from xhdpi-v4/drawable/app_icon.png #generated)
    (new resource id app_icon from xxhdpi-v4/drawable/app_icon.png #generated)
    (new resource id app_icon from xxxhdpi-v4/drawable/app_icon.png #generated)
    (new resource id dialog from /Users/thompson/Documents/Development/Mouse Attack Coaster.old/Temp/StagingArea/android-libraries/gvr-permissionsupport-release/res/layout/dialog.xml)
]
exit code: 1
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 retriesOnFailure)
UnityEditor.HostView:OnGUI()

Ah, rookie mistake! gvr_base_1_0_0.aar contains this info, and had been somehow purged from the build. Re-added and all is well

Just to re-state this:

I’m facing an error in doing a simple build using a clean install of Unity 5.6b9 and the latest GoogleVR SDk (I’ve imported the SDK because it contains the demo examples)

The build process stops at: CommandInvokationFailure: Failed to re-package resources. AndroidManifest.xml:4: error: Error: No resource found that matches the given name (at ‘theme’ with value ‘@style/VrActivityTheme’).

Can anyone else confirm this is happening to them?

Thanks.

In my case, I forgot to add the SDK to the VR SDKs in Player Settings.