Search Unity

[Solved] android build issue w/ unityIAP - enableVrMode

Discussion in 'Unity IAP' started by elenzil, Jul 19, 2017.

Thread Status:
Not open for further replies.
  1. elenzil

    elenzil

    Joined:
    Jan 23, 2014
    Posts:
    73
    hi all -

    there's several threads here and there complaining about this android build error:
    No resource identifier found for attribute 'enableVrMode' in package 'android'.
    But all of them seem to be people working on VR projects, and the solution is to upgrade to the very latest version of Android.

    In our case, we have zero interest in VR or Cardboard, etc, and definitely can't increase our minspec to the very latest version of android. We currently support KitKat (4), and Nougat is 7.

    It seems like the GooglePlay stuff used by IAP is bringing this in.

    I've checked that we do not have "Virtual Reality Supported" enabled in the build settings.

    I've tried removing the references to vr in five various AndroidManifest.xml files, but the gradle build seems to re-generate them w/ the references back.

    I'm not sure where those references are coming from in the first place, grepping for "enableVrMode" just turns up the five manifests.

    tia,
    Orion
     
  2. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    @elenzil

    You don't need to change your Minimum API level at all. You should be able to create a build with your Target API level set to Ver. 24 and after that, you can change it back to whatever you had before. You can find more details here:
    https://forum.unity3d.com/threads/cant-use-iap-on-version-5-5.472094/#post-3079524
     
    elenzil likes this.
  3. elenzil

    elenzil

    Joined:
    Jan 23, 2014
    Posts:
    73
    hi - many thanks for your speedy reply, i appreciate it.

    that link definitely pointed me in the right direction.

    in my case, it was a bit more complicated because of the nature of our build.
    in the end i had to:
    • install SDK level 24.
    • in various gradle files, change the "compileSdkVersion" and the "buildToolsVersion" both to 24.
    • the "minSdkVersion" and "targetSdkVersion" were able to remain at lower versions than 24.
     
    ap-unity likes this.
Thread Status:
Not open for further replies.