Search Unity

Error when compiling program

Discussion in 'AR/VR (XR) Discussion' started by Azat5, Jan 6, 2019.

  1. Azat5

    Azat5

    Joined:
    Jan 2, 2018
    Posts:
    6
    Hello. I have an error when compiling program.

    D:\AR3DObjectsAndShadows\Temp\StagingArea\AndroidManifest-main.xml:3:3-72 Error:
    uses-sdk:minSdkVersion 14 cannot be smaller than version 16 declared in library D:\AR3DObjectsAndShadows\Temp\StagingArea\android-libraries\gvr\AndroidManifest.xml as the library might be using APIs not available in 14
    Suggestion: use a compatible library with a minSdk of at most 14,
    or increase this project's minSdk version to at least 16,
    or use tools: overrideLibrary="com.google.vr.cardboard" to force usage (may lead to runtime failures)
    UnityEditor.HostView:OnGUI()

    Please help me correct this error?
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Well, as the error itself suggests, I recommend you "increase this project's minSdk version to at least 16." Personally, I tend to use 25. You find this in the Player Settings under "Other Settings":

    upload_2019-1-6_6-53-23.png
     
  3. Azat5

    Azat5

    Joined:
    Jan 2, 2018
    Posts:
    6
    JoeStrout, I changed the Minimum API Level to 25, but I have the same error when compiling. Please help, how to correct?
     
  4. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Hmm, that's weird. I suspect your project has a AndroidManifest-main.xml file that's overriding the values from Unity, or something along those lines. Did you create this project from scratch, or is it something you downloaded from somewhere?
     
  5. Hunubul

    Hunubul

    Joined:
    Dec 17, 2018
    Posts:
    65
    Did you isntall the SDKS that are needed for lower API levels? When starting Android Studio, go to configure/SDK manager, and check everything above level 21 for example and you'll bee good to go. If you did that already, you can try reinstalling Android Studio, or you can try setting the SDK path in Unity.