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.

updating android SDK to the last version fix that issue.

I copied AndroidManifest.xml from Temp/StagingArea/ to Assets/Plugins/Android/ and added:

  <uses-feature android:name="android.hardware.sensor.accelerometer" android:required="false" />
  <uses-feature android:name="android.hardware.sensor.gyroscope" android:required="false" />
  <uses-feature android:name="android.software.vr.mode" android:required="false" />

I had this problem and solved it by targeting a higher platform, those features are for API level 24, nougat.

You might be targeting a lower API level.