[英]android:exported needs to be explicitly specified
I have checked all activities in the manifest.xml file, all activities are present with android:exported="true" but it retainlessly showing this error **Manifest merger failed: android:exported needs to be explicitly specified for element <activity#im.dino.dbinspector.activities.DbInspectorActivity>.我检查了 manifest.xml 文件中的所有活动,所有活动都存在于 android:exported="true" 但它无条件地显示此错误.dino.dbinspector.activities.DbInspectorActivity>。 Apps targeting Android 12 and higher are required to specify an explicit value for
android:exported
when the corresponding component has an intent filter defined.当相应组件定义了意图过滤器时,需要针对 Android 12 及更高版本的应用程序为
android:exported
指定显式值。 See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.有关详细信息,请参阅https://developer.android.com/guide/topics/manifest/activity-element#exported 。 ** what should i do now?
** 我现在该怎么办?
my manifest file is我的清单文件是
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="shubham.lists.happyplaces">
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.HappyPlaces"
tools:targetApi="31">
<activity
android:name=".activities.AddHappyPlaceActivity"
android:exported="true"
android:label="ADD HAPPY PLACE"
android:screenOrientation="fullSensor"
android:theme="@style/CustomNoActionBarTheme"
tools:node="merge" />
<activity
android:name=".activities.MainActivity"
android:exported="true"
tools:node="merge">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
gradle build gradle 构建
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}
android {
compileSdk 32
defaultConfig {
applicationId "shubham.lists.happyplaces"
minSdk 22
targetSdk 32
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures{
viewBinding true
}
}
dependencies {
implementation 'de.hdodenhof:circleimageview:3.1.0'
implementation 'androidx.core:core-ktx:1.8.0'
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'com.google.android.material:material:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.karumi:dexter:6.0.1'
debugImplementation 'im.dino:dbinspector:3.4.1@aar'
//androidTestImplementation "androidx.fragment:fragment-testing:<version>"
//androidTestImplementation 'androidx.test.ext:junit'
//androidTestImplementation "androidx.test.ext:junit:1.1.3"
//androidTestImplementation "androidx.compose.ui:ui-test-junit4:1.1.1"
//implementation 'androidx.core:core-ktx:1.8.0'
//implementation 'androidx.appcompat:appcompat:1.4.2'
//implementation 'com.google.android.material:material:1.6.1'
//implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.google.android.material:material:1.6.1'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
WAITING FOR AN EARLY RESPONSSE等待早期反应
Try upgrading im.dino:dbinspector
.尝试升级
im.dino:dbinspector
。 You are on 3.4.1.你在 3.4.1。 The latest is 5.4.7.
最新的是 5.4.7。 And based on the library's manifest in GitHub , this issue should be fixed.
并且根据GitHub 中库的清单,应该修复此问题。
I have the same issue with the same course from Udemy now, can't fix it, already watched all videos and all topics:我现在对 Udemy 的同一门课程有同样的问题,无法修复,已经观看了所有视频和所有主题:
The 'kotlin-android-extensions' Gradle plugin is deprecated. 'kotlin-android-extensions' Gradle 插件已弃用。 Please use this migration guide ( https://goo.gle/kotlin-android-extensions-deprecation ) to start working with View Binding ( https://developer.android.com/topic/libraries/view-binding ) and the 'kotlin-parcelize' plugin.
Please use this migration guide ( https://goo.gle/kotlin-android-extensions-deprecation ) to start working with View Binding ( https://developer.android.com/topic/libraries/view-binding ) and the ' kotlin-parcelize 插件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.