You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Google Play因REQUEST_INSTALL_PACKAGES权限拒审,未使用该权限求解决

问题排查与解决方案

1. 先确认权限是否真的被移除

你添加的tools:node="remove"不一定能确保权限被彻底清除,因为依赖库的权限声明可能通过合并策略残留。可以通过Gradle命令查看最终合并后的Manifest文件:

./gradlew app:processDebugManifest

执行后,在app/build/intermediates/merged_manifest/debug/目录下找到merged/AndroidManifest.xml,搜索REQUEST_INSTALL_PACKAGES,确认该权限是否还存在。

2. 权限来源:老旧广告SDK

你的依赖中com.google.android.gms:play-services-ads:16.0.0是非常早期的版本,这个版本的广告SDK会隐式声明REQUEST_INSTALL_PACKAGES权限,用于广告推广中的应用安装跳转逻辑。即使你添加了移除声明,老版本SDK的合并优先级可能导致权限无法被彻底移除。

3. 升级所有老旧依赖

你的大部分依赖版本都过于陈旧,不仅会带来权限问题,还存在兼容性和安全风险。建议升级到各库的稳定版本:

  • androidx.appcompat:appcompat 升级至1.6.0+
  • com.google.android.material:material 升级至1.9.0+
  • androidx.constraintlayout:constraintlayout 升级至2.1.4+
  • com.google.android.gms:play-services-ads 升级至22.4.0+
  • 使用Firebase BOM统一管理Firebase版本,避免版本冲突

升级后的依赖示例:

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'com.google.android.material:material:1.10.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation 'com.google.android.gms:play-services-ads:22.4.0'
    implementation 'com.android.volley:volley:1.2.1'
    // Firebase BOM统一版本管理
    implementation platform('com.google.firebase:firebase-bom:32.3.1')
    implementation 'com.google.firebase:firebase-core'
    implementation 'com.google.firebase:firebase-messaging'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}
apply plugin: 'com.google.gms.google-services'

4. 强化权限移除声明

如果升级依赖后仍有问题,可以在Manifest中添加更严格的移除声明,确保无论依赖如何都不会引入该权限:

<uses-permission
    android:name="android.permission.REQUEST_INSTALL_PACKAGES"
    tools:node="remove"
    tools:ignore="ManifestPermission" />

5. 重新构建并提交

完成修改后,执行清理和构建命令,确保生成的安装包中无该权限:

./gradlew clean assembleRelease

重新提交到Google Play时,在审核备注中明确说明:应用未使用REQUEST_INSTALL_PACKAGES权限,已通过依赖升级和Manifest声明彻底移除该权限,且应用无任何安装未知应用的功能。

内容的提问来源于stack exchange,提问作者web216

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.15 13:50:30