首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >清单合并失败:android:导出需要为元素<activity#com.instabug.bug显式指定

清单合并失败:android:导出需要为元素<activity#com.instabug.bug显式指定
EN

Stack Overflow用户
提问于 2022-03-17 07:57:01
回答 2查看 4.4K关注 0票数 0

合并错误:错误:需要为元素.显式指定android:导出当相应的组件定义了意图过滤器时,针对Android12及更高版本的应用程序需要为android:exported指定一个显式值。详细信息请参见https://developer.android.com/guide/topics/manifest/activity-element#exported

EN

回答 2

Stack Overflow用户

发布于 2022-03-17 08:05:10

在清单文件(AndroidManifest.xml)中,在ReportingContainerActivity的活动标记中添加android:exported="true“。

票数 4
EN

Stack Overflow用户

发布于 2022-03-17 08:38:31

看看我的舱单,还是一样的问题

代码语言:javascript
复制
<?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="d2si.apps.planetepicking">

    <!-- Permissions -->
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />





    <permission
        android:name="d2si.apps.planetepicking.permission.SCANNER_RESULT_RECEIVER"
        android:protectionLevel="normal" />

    <uses-permission android:name="d2si.apps.planetepicking.permission.SCANNER_RESULT_RECEIVER" />
    <uses-permission android:name="android.permission.BROADCAST_STICKY" />

    <uses-feature
        android:name="android.hardware.camera"
        android:required="true" />

    <application
        android:name=".App"
        android:persistent="true"

        android:allowBackup="true"
        android:icon="@mipmap/ic_roundicon"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_roundicon"
        android:supportsRtl="true"
        android:theme="@style/AppTheme"
        tools:node="merge">




        <activity android:name=".interfaceuser.MainActivity"
            android:theme="@style/AppTheme3"
            android:screenOrientation="fullSensor"
            android:exported="true"
            >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".interfaceuser.ConfigActivity"
            android:theme="@style/AppTheme3"
            android:screenOrientation="fullSensor"
            android:exported="true"
            tools:node="merge"
            >
            <intent-filter>
                <action android:name="android.intent.action.CF" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".interfaceuser.CommandeActivity"
            android:screenOrientation="fullSensor"
            android:exported="true"
            tools:node="merge">
            <intent-filter>
                <action android:name="android.intent.action.CMD" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".interfaceuser.Configuration"
            android:screenOrientation="fullSensor"
            android:theme="@style/AppTheme3"
            android:exported="true"
            tools:node="merge">
            <intent-filter>
                <action android:name="android.intent.action.CNF" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".interfaceuser.LoginActivity"
            android:screenOrientation="fullSensor"
            android:theme="@style/AppTheme3"
            android:exported="true"
            tools:node="merge">
            <intent-filter>
                <action android:name="android.intent.action.LG" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".interfaceuser.AccueilActivity"
            android:screenOrientation="fullSensor"
            android:exported="true"
            tools:node="merge">
            <intent-filter>
                <action android:name="android.intent.action.ACC" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".interfaceuser.PreparationActivity"
            android:screenOrientation="fullSensor"
            android:theme="@style/AppTheme3"


            android:windowSoftInputMode="stateHidden|adjustPan"

            android:exported="true"
            tools:node="merge">
            <intent-filter>
                <action android:name="android.intent.action.PREP" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.LAUNCHER" />

            </intent-filter>
            <intent-filter>
                <action android:name="device.scanner.EVENT"/>
                <category android:name="android.intent.category.DEFAULT"/>

                <data android:mimeType="text/plain"/>
            </intent-filter>

        </activity>





        <activity
            android:name=".interfaceuser.DisplayActivity"
            android:screenOrientation="fullSensor"
            android:exported="true"
            tools:node="merge">

            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".interfaceuser.Demarrer_PrepActivity"
            android:screenOrientation="fullSensor"
            android:exported="true"
            tools:node="merge">
            <intent-filter>
                <action android:name="android.intent.action.DEM" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>



    </application>

</manifest>

票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71508782

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档