gpt4 book ai didi

android - Firebase + 权限

转载 作者:塔克拉玛干 更新时间:2023-11-02 07:46:45 27 4
gpt4 key购买 nike

我刚刚将一个应用从 Firebase 9.0.0 更新到 Firebase 9.0.2。我使用消息传递 + 广告。

compile 'com.google.firebase:firebase-messaging:9.0.2' 
compile "com.google.firebase:firebase-ads:9.0.2"

现在出现了很多不需要的权限

android:name="android.permission.READ_PHONE_STATE"
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:name="android.permission.WRITE_EXTERNAL_STORAGE"

我没有在任何地方添加这些权限,所以它们一定来自 Firebase。我知道我的客户不喜欢这些权限,所以我用

删除了它们
<uses-permission
android:name="android.permission.READ_PHONE_STATE"
tools:node="remove" />
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
tools:node="remove" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
tools:node="remove" />

我的应用程序仍然有效,消息传递和广告仍​​然有效,我仍然希望我的怀疑得到证实。

为什么 Firebase 添加这些权限,真的可以像我一样删除它们吗?

最佳答案

此问题已在 12.0.1 中修复。来源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.

关于android - Firebase + 权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38307751/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com