Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Auto Add read_phone_state since Android SDK 26

Discussion in 'Unity Build Automation' started by TobyKaos, Sep 5, 2017.

  1. TobyKaos

    TobyKaos

    Joined:
    Mar 4, 2015
    Posts:
    214
    Please can you explain us why since UCB use Android SDK 26 we have read_phone_state permission automatically added?

    Maybe related to Facebook SDK 7.9 ?

    Thanks
     
  2. unity-tuesday

    unity-tuesday

    Unity Technologies

    Joined:
    Aug 2, 2016
    Posts:
    42
  3. TobyKaos

    TobyKaos

    Joined:
    Mar 4, 2015
    Posts:
    214
    Ok thanks
     
  4. ollieblanks

    ollieblanks

    Unity Technologies

    Joined:
    Aug 21, 2017
    Posts:
    459
  5. pfleetwood22

    pfleetwood22

    Joined:
    Jun 6, 2016
    Posts:
    28
  6. unity-tuesday

    unity-tuesday

    Unity Technologies

    Joined:
    Aug 2, 2016
    Posts:
    42
    @pfleetwood22 This will eventually be fixed for 5.6.3, but I don't have an ETA on this yet. It's currently resolved in 2017.x.
     
  7. TobyKaos

    TobyKaos

    Joined:
    Mar 4, 2015
    Posts:
    214
    Hello,seems that is not fixed in Unity 2017.2f3.

    Just build with it and my phone require it.
     
  8. pfleetwood22

    pfleetwood22

    Joined:
    Jun 6, 2016
    Posts:
    28
    @tuesdays I saw this was fixed for me on CloudBuild with 5.6.4p1.

    However, now I am seeing local editor non-export-gradle-based builds with a res folder targeting API 25 failing to build with an AndroidManifest merge warning. Basically, whether I put an AndroidManifest file in Plugins/Android/res or not, the targetSdkVersion is overwritten with 26, and this causes me to get an error about a library targeting 26 when the main project is targeting 25. (I have made sure the Target API Level drop down in build settings is for 25).

    How do I get Unity to write a proper API 25 targeting AndroidManifest.xml file for the Plugins/Android/res folder? Weirdly, when I export first, and then do a gradle build manually everything works. Cloud build also works.

    I tried deleting my Library folder (as we took our project back from 26 to 25, which might be a bit unusual) in hopes that would help, but it didn't.