I changed my gradle build file to use the latest Google play services version (11.8.0 -> 12.0.0) and uploaded the APK to the Google Play Console. When I tried to release, I got a warning that READ_PHONE_STATE permission had been added. If I roll back to 11.8.0, this warning disappears.
I use the following services:
implementation 'com.google.android.gms:play-services-auth:12.0.0'
implementation 'com.google.android.gms:play-services-plus:12.0.0'
api 'com.google.android.gms:play-services-maps:12.0.0'
api 'com.google.android.gms:play-services-location:12.0.0'
api 'com.google.android.gms:play-services-places:12.0.0'
It seems it was automatically added to a generated manifest.xml even though I don't need this permission (at least I didn't for play services 11.8.0). Having looked around, it seems it is an issue when a minSdk/targetSdk is not declared in an included library.
Does anyone know what is happening and how I can get rid of this permission please?
Thanks, Riz
Edit: this was marked by a moderator as an exact duplicate of Why has the READ_PHONE_STATE permission been added? . Unfortunately the solution in that question was that Play services was updated in 10.0.1 to fix this issue. It seems that version 12.0.0 reintroduces this issue so am looking for a solution.