小编Tes*_*est的帖子

清单合并失败:需要为 <receiver> 显式指定 android:exported

合并错误:错误:需要为元素 <receiver#com.instacart.library.truetime.BootCompletedBroadcastReceiver> 显式指定 android:exported。android:exported当相应组件定义了意图过滤器时,面向 Android 12 及更高版本的应用需要指定显式值。 有关详细信息,请参阅 https://developer.android.com/guide/topics/manifest/activity-element#exported 。test.app 主清单(此文件),第 19 行

我什至不知道该怎么办。我为这个错误挣扎了整整一个星期,但我做不到。

这是我的sdk版本

compileSdkVersion 32
    defaultConfig {
        multiDexEnabled true
        applicationId "com.example.app"
        minSdkVersion 21
        targetSdkVersion 32
        versionCode 53
        versionName "2.0.4"
        ndk.abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
Run Code Online (Sandbox Code Playgroud)

android:exported在所有intent-filterservice、 和上provider。啊,我没有receiver这个错误中提到的。

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])

    implementation 'androidx.appcompat:appcompat:1.4.1'
    implementation 'com.google.android.material:material:1.5.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.3'

    implementation "com.android.billingclient:billing:4.0.0"

    implementation "com.google.firebase:firebase-messaging:23.0.0"
    implementation "com.google.firebase:firebase-crashlytics:18.2.7"
    implementation "com.google.firebase:firebase-analytics:20.0.2"
    implementation "com.google.firebase:firebase-perf:20.0.4"
    implementation "com.google.firebase:firebase-dynamic-links:21.0.0" …
Run Code Online (Sandbox Code Playgroud)

java sdk android android-manifest

7
推荐指数
2
解决办法
1万
查看次数

标签 统计

android ×1

android-manifest ×1

java ×1

sdk ×1