Search Unity

Bug Unity 2021.3.21 keeps adding OpenGLES2 usage into Android Manifest

Discussion in 'Android' started by jason_yak, Mar 27, 2023.

  1. jason_yak

    jason_yak

    Joined:
    Aug 25, 2016
    Posts:
    531
    Hi there,

    I'm hoping someone might have an idea why this entry for OpenGLES2 keeps getting added to our apps android manifest even though our settings are set to support Vulkan only:

    <uses-feature android:glEsVersion="0x00020000" />


    We are wanting to take a more aggresive approach and only support a minimum of Android 10 and up. From Android 10 all devices must support Vulkan and must support 64bit, we should be able to have a Vulkan only app at this point. Also, OpenGLES2 is deprecated, which is another reason that it seems strange that this would be added.

    This is how our graphics api settings look: https://www.dropbox.com/s/ps7l8dwgz3u3rmv/android_gfx-api.png

    Does anyone know how to stop this from happening? Of course I can hack in some post processing to remove the line, but I'd rather track down the reason its being added in the first place. Note that our custom manifest file does not include this entry ^ it gets added after exporting an Android Studio project.

    Thanks!
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,916
    Check <unityproject>Library\Bee\artifacts\Android\Manifest\IntermediateLibraryManifestDiag.txt it might contain info about that entry.
     
  3. jason_yak

    jason_yak

    Joined:
    Aug 25, 2016
    Posts:
    531
    That's a handy log file, but unfortunately it doesn't shed any light. It has this expected line:

    Using template 'Assets/Plugins/Android/AndroidManifest.xml'
    android.hardware.vulkan.version was added because:
    One of the graphics devices was Vulkan
    android.permission.INTERNET was added because.... (and so forth)


    But no clues why gles is added. I double checked any loose manifest files from plugins within the project and nothing has this entry in their manifests. I only have a couple of android plugins in the project and have tried completely removing all of them except Rewired, however I figure if it was the culprit it should turn up in that log file above ^.
     
  4. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,916
    Actually I think this might be a legit bug, could you report a bug please so we can prioritize?

    Alternatively you can add OpenGL ES 3 which will override this entry, not sure if that's acceptable in your case.
     
  5. jason_yak

    jason_yak

    Joined:
    Aug 25, 2016
    Posts:
    531
    Yup it is. I've submitted a bug report as the issue can be replicated in an empty project. Simply choose Vulkan only, export to an android studio project and the GLES2 entry will be in the manifest.

    There might be other settings I've changed to replicate it also but not sure. I made an empty repro project, I changed a bunch of player settings like setting the graphics api selection to Vulkan only. Enabled 64bit support only, IL2CPP scripting backend, minimum android api level to 10, auto for target which for us means api level 33 (the latest at time of writing) and I enabled R8 minify because I know it's required. Build settings are set to export a project and to use AAB.

    Export the project and then look in the manifest for the GLES entry that shouldn't be there: /Build/unityLibrary/src/main/AndroidManifest.xml
     
  6. jason_yak

    jason_yak

    Joined:
    Aug 25, 2016
    Posts:
    531
    ...and bug report case number is: IN-36626
     
  7. Ectoplastic

    Ectoplastic

    Joined:
    Mar 2, 2019
    Posts:
    8
    Hi! Is there any updates on this because we run into the same thing and did not found the bug via the issue tracker. Thank you very much!
     
  8. Evaldas_Unity

    Evaldas_Unity

    Unity Technologies

    Joined:
    Jun 23, 2016
    Posts:
    85
  9. Ectoplastic

    Ectoplastic

    Joined:
    Mar 2, 2019
    Posts:
    8
    Thanks!!