Search code examples
c#unity-game-enginevirtual-realitygoogle-vr

No resource identifier found for attribute 'enableVrMode' in package 'android'


I've started working on converting a game into Virtual reality. For starting purposes, I've created an empty project and imported Google VR plugin. But when I want to create the build in cellphone, following error occurs:

CommandInvokationFailure: Failed to re-package resources. See the Console for details. stderr[ AndroidManifest.xml:30: error: No resource identifier found for attribute 'enableVrMode' in package 'android'

stdout[
Configurations:
 (default)`

I've searched internet, changed API levels, did everything I could. But it didn't worked. Need your help guys.


Solution

  • The enableVrMode attribute was added in Android N. You will get this error if you are using anything less that this version.

    Download Android SDK Platform-Tools 24 and then Android 7.0 (API 24). You can do this from Android Studio. That should solve your problem.

    If this does not solve your problem, note that the latest Google VR SDK includes some API that requires Unity VR Technical preview to work.You can read here for more information.