9***@qq.com
9***@qq.com
  • 发布:2025-07-19 12:02
  • 更新:2025-07-19 12:02
  • 阅读:502

【报Bug】云打包无法修改AndroidManifest.xml中的android:exported为true,无法修改权限配置

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Mac

PC开发环境操作系统版本号: macOS 15.1

HBuilderX类型: 正式

HBuilderX版本号: 4.75

手机系统: Android

手机系统版本号: Android 15

手机厂商: 华为

手机机型: 荣耀V20

页面类型: vue

vue版本: vue2

打包方式: 云端

项目创建方式: HBuilderX

示例代码:
<?xml version="1.0" encoding="utf-8"?>  
<manifest xmlns:android="http://schemas.android.com/apk/res/android"   
    xmlns:tools="http://schemas.android.com/tools"  
    package="com.oxmd.app">  
    <application>  
        <!-- 云打包中不会处理 tools 命名空间 这个方法无效-->  
        <!-- 给主 Activity 添加一个可接受分享图片的 intent-filter -->  
        <activity android:name="io.dcloud.PandoraEntryActivity" android:exported="true"   
        tools:replace="android:exported">  
            <intent-filter>  
                <action android:name="android.intent.action.SEND" />  
                <category android:name="android.intent.category.DEFAULT" />  
                <data android:mimeType="image/*" />  
            </intent-filter>  
        </activity>  
    </application>  
</manifest>

操作步骤:

直接云打包

预期结果:

云打包后解包apk,得到AndroidManifest文件里面的android:exported为true,可以在手机相册分享中暴露出app

实际结果:

云打包后解包apk,得到AndroidManifest文件里面的android:exported为false,无法在手机相册分享中暴露出app

bug描述:

我在项目根目录新增了AndroidManifest.xml文件,添加了android.intent.action.SEND权限,但是云打包后android:exported被设置为false,无法在手机相册分享中暴露出来。

2025-07-19 12:02 负责人:无 分享
已邀请:

要回复问题请先登录注册