【发布时间】:2019-05-30 16:10:26
【问题描述】:
我在 Play 商店中有大约十几个相同的应用程序,并针对不同的客户端进行了 UI 调整。我最近收到一封来自 Google Play 的自动电子邮件,用于我的 2 个应用程序(但不是其他应用程序),说它们是 use permissions which are no longer allowed。他们在底部的电子邮件特别说明了应用 ID 和权限READ_CALL_LOG, WRITE_CALL_LOG
问题是我的应用程序都没有使用这些权限。我引入的所有库都没有使用这些权限。我已经通过aapt l -a myApp.apk | grep CALL_LOG 进行了验证,没有命中。
有没有什么其他权限会以某种方式隐式包含这些权限?我担心这一定是 Play 商店的错误,因为我的其他应用都没有被标记?有什么我可能会忽略的吗?
如果有帮助,这里列出了我的清单中的所有权限:
$ ./aapt l -a ~/myApp.apk | grep PERMISSION -i
[snip some string resources...]
A: android:name(0x01010003)="com.mycompany.myapp.permission.C2D_MESSAGE" (Raw: "com.mycompany.myapp.permission.C2D_MESSAGE")
E: uses-permission (line=16)
A: android:name(0x01010003)="com.mycompany.myapp.permission.C2D_MESSAGE" (Raw: "com.mycompany.myapp.permission.C2D_MESSAGE")
E: uses-permission (line=17)
A: android:name(0x01010003)="android.permission.ACCESS_FINE_LOCATION" (Raw: "android.permission.ACCESS_FINE_LOCATION")
E: uses-permission (line=18)
A: android:name(0x01010003)="android.permission.ACCESS_COARSE_LOCATION" (Raw: "android.permission.ACCESS_COARSE_LOCATION")
E: uses-permission (line=19)
A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET")
E: uses-permission (line=20)
A: android:name(0x01010003)="android.permission.VIBRATE" (Raw: "android.permission.VIBRATE")
E: uses-permission (line=21)
A: android:name(0x01010003)="android.permission.WRITE_EXTERNAL_STORAGE" (Raw: "android.permission.WRITE_EXTERNAL_STORAGE")
E: uses-permission (line=22)
A: android:name(0x01010003)="android.permission.WAKE_LOCK" (Raw: "android.permission.WAKE_LOCK")
E: uses-permission (line=23)
A: android:name(0x01010003)="com.google.android.c2dm.permission.RECEIVE" (Raw: "com.google.android.c2dm.permission.RECEIVE")
E: uses-permission (line=24)
A: android:name(0x01010003)="android.permission.CAMERA" (Raw: "android.permission.CAMERA")
E: uses-permission (line=45)
A: android:name(0x01010003)="android.permission.BLUETOOTH" (Raw: "android.permission.BLUETOOTH")
E: uses-permission (line=48)
A: android:name(0x01010003)="android.permission.BLUETOOTH_ADMIN" (Raw: "android.permission.BLUETOOTH_ADMIN")
E: uses-permission (line=51)
A: android:name(0x01010003)="android.permission.RECEIVE_BOOT_COMPLETED" (Raw: "android.permission.RECEIVE_BOOT_COMPLETED")
E: uses-permission-sdk-23 (line=53)
A: android:name(0x01010003)="android.permission.ACCESS_COARSE_LOCATION" (Raw: "android.permission.ACCESS_COARSE_LOCATION")
E: uses-permission (line=55)
A: android:name(0x01010003)="android.permission.ACCESS_NETWORK_STATE" (Raw: "android.permission.ACCESS_NETWORK_STATE")
A: android:permission(0x01010006)="com.google.android.c2dm.permission.SEND" (Raw: "com.google.android.c2dm.permission.SEND")
A: android:grantUriPermissions(0x0101001b)=(type 0x12)0xffffffff
A: android:permission(0x01010006)="com.google.android.gms.auth.api.signin.permission.REVOCATION_NOTIFICATION" (Raw: "com.google.android.gms.auth.api.signin.permission.REVOCATION_NOTIFICATION")
A: android:permission(0x01010006)="android.permission.INSTALL_PACKAGES" (Raw: "android.permission.INSTALL_PACKAGES")
A: android:permission(0x01010006)="com.google.android.c2dm.permission.SEND" (Raw: "com.google.android.c2dm.permission.SEND")
【问题讨论】:
-
如果你 grep 为
targetSdkVersion,你会得到什么值? -
好问题 - 我在我的 gradle 文件中定位 26,但 aapt 显示 'android:targetSdkVersion(0x01010270)=(type 0x10)0x16'。 (22) 在这种情况下,我可能在更新 gradle 后没有重新构建应用程序?
-
aapt 没有骗你——你提供的 APK 目标是 22。
-
是的,我同意。我还没有在 Google Play 中更新这个 apk。但是我仍然没有使用调用的权限...... targetSdkVersion 可能是这里问题的一部分吗?
标签: android google-play android-permissions