Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

Target API level not being recognized by Google Play

Discussion in 'Android' started by Deleted User, Jul 21, 2018.

  1. Deleted User

    Deleted User

    Guest

    Hello!
    I have been working on a game using Unity 5.6.1f1 and hadn't upgraded it to a newer Unity version just to be safe. When uploading my game to Google Play, I had an error saying my target API was too low (API level 25) and needed to be set to 26. I looked in Android Studio and sure enough, I didn't have the most current API level installed. I installed 26, and restarted Unity. It did not show a higher API above 25 still. I ended up upgrading my project to Unity 5.6.6f2 and now I can select API level 26 as the target API.

    So, I either set the target to 26, or highest installed, build the apk and upload it to Google Play. Every time it tells me that my target API level is 22. I even tried changing the highest minimum API from level 16 to 23 and I still get the error that it's set to 22. I have deleted the project in Google Play and started a new one, rebooting my PC and it still gives me the error.

    I then deleted all the previous API levels installed in Android Studio, rebooted, and still the same error. I then started a fresh Unity project and saved a simple scene. I started a new project for Google Play and that one uploads just fine, using the same version of Unity that I'm trying to use for my game (5.6.6f2).

    I've googled this and I can't find any reason why this is the case. I've included a screenshot of Android Studio, my player settings for Unity, and the error I get from Google Play. Does anyone have any advice for troubleshooting?

    Thank you!
     

    Attached Files:

  2. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    824
    Do you have Assets/Plugins/Android/AndroidManifest.xml file in your project? If you do, check what target sdk level is set there. In latest Unity versions we always overwrite the manifest value with the value selected in the editor, but in Unity 5.6 that probably does not happen and manifest file has a priority.
     
    Deleted User likes this.
  3. Deleted User

    Deleted User

    Guest

    You are right! I had assumed it was being overwritten but it does show that the target API level is 22! Thanks for pointing me in the right direction. I can't believe I never thought to check the AndroidManifest file.