合并错误:错误:需要为元素 <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-filter
、service
、 和上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)