Why has the READ_PHONE_STATE permission been added?

Posted in :

發佈新的版本apk 到 google play 發現,被要求新的權限。

現有 APK 的版本代碼為 33 的使用者可能需接受「android.permission.READ_PHONE_STATE」權限,但使用者可能因此無法升級至這個應用程式版本。

提示

確認應用程式要求取得的是必要權限,並思考如何在「這個版本有哪些新功能?」部分的文字中提及應用程式需取得這些權限。


 

Update #2Version 10.0.1 fixes the issue again.

Update: this also occurs in version 10.0.0 of Google Play services, as reported in this post.

Previous Answer:

Per this post in the Android Developers G+ Community, one of the moderators (me) posted this comment:

I already reported this issue internally yesterday when a developer pointed it out, the fix has already been made internally, and an updated SDK is coming soon

And the updated SDK is now available – use the 9.6.1 Google Play services dependency.


發生的原因是

implementation 'com.google.android.gms:play-services-ads:12.0.0'

解法,再往上升一個版本:

implementation 'com.google.android.gms:play-services-ads:12.0.1'

或改用

implementation 'com.google.android.gms:play-services-ads:11.8.0'

詳細資訊:

https://developers.google.com/android/guides/releases

March 28, 2018 – Verison 12.0.1

Issues fixed in 12.0.1:

  • Fixes issue that caused spurious Android lint errors claiming GoogleSignIn and CredentialsClient were internal-only.
  • Adds missing minSdkVersion in -license artifacts to prevent automatic inclusion of READ_PHONE_STATE and READ_EXTERNAL_STORAGE permissions.
  • Restores unique package names for runtime linked -license artifacts which affected some build systems’ (e.g. Ionic Pro) compatibility issues.
  • Restores some fields names that were obfuscated in 12.0.1, namely the value()method of @PropertyName annotations in firebase-firestore and firebase-database.

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *