Android: export를 명시적으로 지정해야 합니다 . Android 12 이상을 대상 으로 하는 앱은 다음 을 지정해야 합니다 .
Android 12로의 업그레이드 후 어플리케이션이 컴파일되지 않습니다.알 수 있다
"매니페스트 병합이 여러 오류로 인해 실패했습니다. 로그 참조"
병합된 매니페스트에 오류 표시:
: Android:를 명시적으로 12 으로 하는 에서는, 「Android:」 「Android:」 「Android:」 「Android:」 「Android:」의 를 지정할 필요가 . Android 12 이상을 대상으로 하는 앱은 에 대한 명시적 값을 지정해야 합니다.
android:exported
해당 컴포넌트에 의도 필터가 정의되어 있는 경우.https://developer.android.com/guide/topics/manifest/activity-element#exported 를를를를참참참참 。메인 매니페스트 (이 파일)
는 모든 를 는는으로 했다.android:exported="false"
그러나 이 문제는 여전히 발생하고 있습니다.
매니페스트 파일:
<?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="eu.siacs.conversations">
<uses-sdk tools:overrideLibrary="net.ypresto.androidtranscoder" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission
android:name="android.permission.READ_PHONE_STATE"
android:maxSdkVersion="22" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-feature
android:name="android.hardware.location"
android:required="false" />
<uses-feature
android:name="android.hardware.location.gps"
android:required="false" />
<uses-feature
android:name="android.hardware.location.network"
android:required="false" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<uses-feature
android:name="android.hardware.camera.autofocus"
android:required="false" />
<uses-feature
android:name="android.hardware.microphone"
android:required="false" />
<application
android:name=".Application"
android:allowBackup="false"
android:allowClearUserData="true"
android:appCategory="social"
android:hardwareAccelerated="true"
android:icon="@mipmap/ic_app_launch"
android:label="@string/app_name"
android:largeHeap="true"
android:networkSecurityConfig="@xml/network_security_configuration"
android:requestLegacyExternalStorage="true"
android:roundIcon="@mipmap/ic_app_launch_round"
android:theme="@style/ConversationsTheme"
android:usesCleartextTraffic="true"
android:windowSoftInputMode="adjustPan|adjustResize"
tools:replace="android:label"
tools:targetApi="q">
<activity
android:name=".ui.search.GroupSearchActivity"
android:exported="true" />
<activity
android:name=".ui.profileUpdating.FavouritesActivity"
android:exported="true" />
<activity
android:name=".ui.profileUpdating.NameActivity"
android:exported="true" />
<activity
android:name=".ui.CompulsoryUpdateActivity"
android:exported="true" />
<activity android:name=".ui.payments.doPayment.DoPaymentActivity"
android:exported="true" />
<activity android:name=".ui.individualList.IndividualListActivity"
android:exported="true" />
<activity android:name=".ui.payments.setPayment.SetPaymentActivity"
android:exported="true" />
<activity android:name=".ui.login.otpActivity.OTPActivity"
android:exported="true" />
<activity android:name=".ui.login.loginActivity.LoginActivity"
android:exported="true" />
<service android:name=".services.XmppConnectionService" android:exported="true" />
<receiver android:name=".services.EventReceiver"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
<action android:name="android.intent.action.ACTION_SHUTDOWN" />
<action android:name="android.media.RINGER_MODE_CHANGED" />
</intent-filter>
</receiver>
<activity
android:name=".ui.ShareLocationActivity"
android:label="@string/title_activity_share_location"
android:exported="true"/>
<activity
android:name=".ui.SearchActivity"
android:label="@string/search_messages"
android:exported="true" />
<activity
android:name=".ui.RecordingActivity"
android:configChanges="orientation|screenSize"
android:theme="@style/ConversationsTheme.Dialog"
android:exported="true" />
<activity
android:name=".ui.ShowLocationActivity"
android:label="@string/title_activity_show_location"
android:exported="true" />
<activity
android:name=".ui.SplashActivity"
android:theme="@style/SplashTheme"
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=".ui.ConversationsActivity"
android:label="@string/app_name"
android:launchMode="singleTask"
android:minWidth="300dp"
android:minHeight="300dp"
android:exported="true"
android:windowSoftInputMode="stateHidden" />
<activity
android:name=".ui.ScanActivity"
android:screenOrientation="portrait"
android:exported="true"
android:theme="@style/ConversationsTheme.FullScreen"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name=".ui.UriHandlerActivity"
android:label="@string/app_name"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="xmpp" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" />
<data android:host="im.app.in" />
<data android:pathPrefix="/i/" />
<data android:pathPrefix="/j/" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SENDTO" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="imto" />
<data android:host="jabber" />
</intent-filter>
</activity>
<activity
android:name=".ui.StartConversationActivity"
android:label="@string/title_activity_start_conversation"
android:launchMode="singleTop"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
</intent-filter>
</activity>
<activity
android:name=".ui.SettingsActivity"
android:label="@string/title_activity_settings"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.NOTIFICATION_PREFERENCES" />
</intent-filter>
</activity>
<activity
android:name=".ui.ChooseContactActivity"
android:label="@string/title_activity_choose_contact"
android:exported="true" />
<activity
android:name=".ui.BlocklistActivity"
android:label="@string/title_activity_block_list"
android:exported="true"/>
<activity
android:name=".ui.ChangePasswordActivity"
android:label="@string/change_password_on_server"
android:exported="true"/>
<activity
android:name=".ui.ChooseAccountForProfilePictureActivity"
android:enabled="false"
android:label="@string/choose_account"
android:exported="true">
<intent-filter android:label="@string/set_profile_picture">
<action android:name="android.intent.action.ATTACH_DATA" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>
</activity>
<activity
android:name=".ui.ShareViaAccountActivity"
android:label="@string/title_activity_share_via_account"
android:launchMode="singleTop"
android:exported="true" />
<activity
android:name=".ui.EditAccountActivity"
android:launchMode="singleTop"
android:exported="true"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name=".ui.ConferenceDetailsActivity"
android:label="@string/action_muc_details"
android:exported="true"
android:windowSoftInputMode="stateHidden" />
<activity
android:name=".ui.ContactDetailsActivity"
android:exported="true"
android:windowSoftInputMode="stateHidden" />
<activity
android:name=".ui.PublishProfilePictureActivity"
android:label="@string/mgmt_account_publish_avatar"
android:exported="true"
android:windowSoftInputMode="stateHidden" />
<activity
android:name=".ui.PublishGroupChatProfilePictureActivity"
android:exported="true"
android:label="@string/group_chat_avatar" />
<activity
android:name=".ui.ShareWithActivity"
android:label="@string/app_name"
android:launchMode="singleTop"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.SEND" />
<action android:name="android.intent.action.SEND_MULTIPLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND" />
<action android:name="android.intent.action.SEND_MULTIPLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="*/*" />
</intent-filter>
<!-- the value here needs to be the full class name; independent of the configured applicationId -->
<meta-data
android:name="android.service.chooser.chooser_target_service"
android:value="eu.siacs.conversations.services.ContactChooserTargetService" />
</activity>
<activity
android:name=".ui.TrustKeysActivity"
android:label="@string/trust_omemo_fingerprints"
android:exported="true"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
android:exported="true"
android:theme="@style/Base.Theme.AppCompat" />
<activity android:name=".ui.MemorizingActivity"
android:exported="true" />
<activity
android:name=".ui.MediaBrowserActivity"
android:exported="true"
android:label="@string/media_browser" />
<service android:name=".services.ExportBackupService" android:exported="true"/>
<service android:name=".services.ImportBackupService" android:exported="true"/>
<service
android:name=".services.ContactChooserTargetService"
android:permission="android.permission.BIND_CHOOSER_TARGET_SERVICE"
android:exported="true">
<intent-filter>
<action android:name="android.service.chooser.ChooserTargetService" />
</intent-filter>
</service>
<service android:name=".services.CompulsoryUpdateService" android:exported="true"/>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.files"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
<provider
android:name=".services.BarcodeProvider"
android:authorities="${applicationId}.barcodes"
android:exported="false"
android:grantUriPermissions="true" />
<activity
android:name=".ui.ShortcutActivity"
android:label="@string/contact"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.CREATE_SHORTCUT" />
</intent-filter>
</activity>
<activity
android:name=".ui.MucUsersActivity"
android:exported="true"
android:label="@string/group_chat_members" />
<activity
android:name=".ui.ChannelDiscoveryActivity"
android:exported="true"
android:label="@string/discover_channels" />
<activity
android:name=".ui.RtpSessionActivity"
android:autoRemoveFromRecents="true"
android:exported="true"
android:launchMode="singleInstance"
android:supportsPictureInPicture="true" />
</application>
</manifest>
두 번째 매니페스트 파일:
<?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="eu.siacs.conversations">
<application tools:ignore="GoogleAppIndexingWarning">
<activity
android:name=".ui.ManageAccountActivity"
android:label="@string/title_activity_manage_accounts"
android:launchMode="singleTask"
android:exported="true"/>
<activity
android:name=".ui.MagicCreateActivity"
android:label="@string/create_new_account"
android:launchMode="singleTask"
android:exported="true"/>
<activity
android:name=".ui.EasyOnboardingInviteActivity"
android:label="@string/invite_to_app"
android:launchMode="singleTask" />
<activity
android:name=".ui.ImportBackupActivity"
android:label="@string/restore_backup"
android:launchMode="singleTask"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="application/vnd.conversations.backup" />
<data android:scheme="content" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="application/vnd.conversations.backup" />
<data android:scheme="file" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="content" />
<data android:host="*" />
<data android:mimeType="*/*" />
<data android:pathPattern=".*\\.ceb" />
<data android:pathPattern=".*\\..*\\.ceb" />
<data android:pathPattern=".*\\..*\\..*\\.ceb" />
<data android:pathPattern=".*\\..*\\..*\\..*\\.ceb" />
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.ceb" />
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.ceb" />
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.ceb" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="file" />
<data android:host="*" />
<data android:mimeType="*/*" />
<data android:pathPattern=".*\\.ceb" />
<data android:pathPattern=".*\\..*\\.ceb" />
<data android:pathPattern=".*\\..*\\..*\\.ceb" />
<data android:pathPattern=".*\\..*\\..*\\..*\\.ceb" />
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.ceb" />
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.ceb" />
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.ceb" />
</intent-filter>
</activity>
</application>
</manifest>
내 그래들 파일:
import com.android.build.OutputFile
// Top-level build file where you can add configuration options common to all
// sub-projects/modules.
buildscript {
ext.kotlin_version = "1.5.21"
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
gradlePluginPortal()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.2'
classpath 'com.google.gms:google-services:4.3.8'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.google.gms.google-services'
repositories {
google()
mavenCentral()
jcenter()
maven { url 'https://jitpack.io' }
}
configurations {
conversationsFreeCompatImplementation
}
dependencies {
implementation 'androidx.viewpager:viewpager:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'org.sufficientlysecure:openpgp-api:10.0'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'androidx.exifinterface:exifinterface:1.3.2'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'androidx.emoji:emoji:1.1.0'
implementation 'com.google.android.material:material:1.4.0'
conversationsFreeCompatImplementation 'androidx.emoji:emoji-bundled:1.1.0'
implementation 'org.bouncycastle:bcmail-jdk15on:1.64'
//zxing stopped supporting Java 7 so we have to stick with 3.3.3
//https://github.com/zxing/zxing/issues/1170
implementation 'com.google.zxing:core:3.4.1'
implementation 'de.measite.minidns:minidns-hla:0.2.4'
implementation 'me.leolin:ShortcutBadger:1.1.22@aar'
implementation 'org.whispersystems:signal-protocol-java:2.8.1'
implementation 'com.makeramen:roundedimageview:2.3.0'
implementation "com.wefika:flowlayout:0.4.1"
implementation 'net.ypresto.androidtranscoder:android-transcoder:0.3.0'
implementation 'org.jxmpp:jxmpp-jid:1.0.1'
implementation 'org.osmdroid:osmdroid-android:6.1.10'
implementation 'org.hsluv:hsluv:0.2'
implementation 'org.conscrypt:conscrypt-android:2.5.2'
implementation 'me.drakeet.support:toastcompat:1.1.0'
implementation "com.leinardi.android:speed-dial:3.2.0"
implementation "com.squareup.retrofit2:retrofit:2.9.0"
implementation "com.squareup.retrofit2:converter-gson:2.9.0"
implementation "com.squareup.okhttp3:okhttp:5.0.0-alpha.2"
implementation 'com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.2'
implementation 'com.google.guava:guava:30.1.1-android'
implementation 'org.webrtc:google-webrtc:1.0.32006'
// Lifecycle Helper
implementation "androidx.activity:activity-ktx:1.3.0-rc02"
implementation "androidx.fragment:fragment-ktx:1.3.6"
//Navigation
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
//CardView
implementation "androidx.cardview:cardview:1.0.0"
//Country Code Picker
implementation 'com.hbb20:ccp:2.5.3'
//Firebase
implementation 'com.google.firebase:firebase-bom:28.3.0'
implementation 'com.google.firebase:firebase-auth-ktx:21.0.1'
implementation 'androidx.browser:browser:1.3.0'
//OTP view
implementation 'com.github.mukeshsolanki:android-otpview-pinview:2.1.2'
//Retrofit
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
//Gson
implementation 'com.google.code.gson:gson:2.8.7'
//Multidex
implementation 'androidx.multidex:multidex:2.0.1'
//Round Image
implementation 'de.hdodenhof:circleimageview:3.1.0'
// Button with image and text
implementation 'com.github.Omega-R:OmegaCenterIconButton:0.0.4@aar'
//Razor pay
implementation 'com.razorpay:checkout:1.6.10'
//Mixpanel Tracking
implementation 'com.mixpanel.android:mixpanel-android:5.9.1'
//Loading screen
implementation 'com.wang.avi:library:2.1.3'
//Loading
implementation 'com.wang.avi:library:2.1.3'
//Form
implementation 'com.quickbirdstudios:surveykit:1.1.0'
}
ext {
travisBuild = System.getenv("TRAVIS") == "true"
preDexEnabled = System.getProperty("pre-dex", "true")
abiCodes = ['armeabi-v7a': 1, 'x86': 2, 'x86_64': 3, 'arm64-v8a': 4]
}
android {
compileSdkVersion 31
defaultConfig {
minSdkVersion 24
targetSdkVersion 31
versionCode 44
versionName "2.0.4"
multiDexEnabled = true
archivesBaseName += "-$versionName"
applicationId "com.app.app"
resValue "string", "applicationId", applicationId
def appName = "app"
resValue "string", "app_name", appName
buildConfigField "String", "APP_NAME", "\"$appName\""
}
splits {
abi {
universalApk true
enable true
}
}
configurations {
compile.exclude group: 'org.jetbrains' , module:'annotations'
}
dataBinding {
enabled true
}
dexOptions {
// Skip pre-dexing when running on Travis CI or when disabled via -Dpre-dex=false.
preDexLibraries = preDexEnabled && !travisBuild
jumboMode true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
flavorDimensions("mode", "distribution", "emoji")
productFlavors {
conversations {
dimension "mode"
}
free {
dimension "distribution"
versionNameSuffix "+f"
}
compat {
dimension "emoji"
versionNameSuffix "c"
}
}
sourceSets {
conversationsFreeCompat {
java {
srcDir 'src/freeCompat/java'
srcDir 'src/conversationsFree/java'
}
}
}
buildTypes {
release {
shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
versionNameSuffix "r"
}
debug {
shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
versionNameSuffix "d"
}
}
if (new File("signing.properties").exists()) {
Properties props = new Properties()
props.load(new FileInputStream(file("signing.properties")))
signingConfigs {
release {
storeFile file(props['keystore'])
storePassword props['keystore.password']
keyAlias props['keystore.alias']
keyPassword props['keystore.password']
}
}
buildTypes.release.signingConfig = signingConfigs.release
}
lintOptions {
disable 'MissingTranslation', 'InvalidPackage','AppCompatResource'
}
subprojects {
afterEvaluate {
if (getPlugins().hasPlugin('android') ||
getPlugins().hasPlugin('android-library')) {
configure(android.lintOptions) {
disable 'AndroidGradlePluginVersion', 'MissingTranslation'
}
}
}
}
packagingOptions {
exclude 'META-INF/BCKEY.DSA'
exclude 'META-INF/BCKEY.SF'
}
android.applicationVariants.all { variant ->
variant.outputs.each { output ->
def baseAbiVersionCode = project.ext.abiCodes.get(output.getFilter(OutputFile.ABI))
if (baseAbiVersionCode != null) {
output.versionCodeOverride = (100 * variant.versionCode) + baseAbiVersionCode
}
}
}
}
이 문제가 발생했는데 사용하던 라이브러리 중 하나가 올바르게 설정되지 않았습니다.
위치 찾기
.
다양한 접근방식으로 실행할 수 있습니다(아래 참조).
merge-manifest를 검사하여 검색
다음의 순서에 따라서, 찾을 수 있습니다.
Target SDK를 30으로 설정합니다(31+오류 무음).
응용 프로그램 매니페스트 열기(
AndroidManifest.xml
한 다음 '어울릴 수 없습니다를 클릭합니다.Merged Manifest
「 」 「 」 、 「 」
「」를 는,
build.gradle
들면 다음과 같습니다.allprojects { buildDir = "${rootProject.rootDir}/build/${project.name}" }
다음과 같은 서브패스에 유사한 것이 있어야 합니다.
build/my-app/intermediates/merged_manifest/debug/AndroidManifest.xml
모든 라이브러리의 개별 매니페스트 파일로 이동합니다(마지된 매니페스트를 만들고 병합된 매니페스트를 볼 수 있는 경우 이 단계를 건너뛸 수 있습니다).
유형 액티비티, 서비스, 리시버 또는 프로바이더의 엔트리가 있는지 검색합니다.
exported
엔트리에의 "entries"을 따릅니다(또는 "Fix found entries" 방법에 한 번 ).exported
속성)을 참조해 주세요.Target SDK를 다시 31(또는 30으로 변경 전)로 설정합니다.
콘솔 로그로 검색
Git-bash에서는 다음과 같이 실행됩니다.
./gradlew assembleDebug --stacktrace --info | tee my-logs.txt
.
my-logs.txt
파일(이전 절차에서 작성한 텍스트 텍스트 편집)을 지정합니다.이제 로그에는 정확한 위치가 숨겨져 있습니다.따라서 생성된 에서 검색합니다.
my-logs.txt
키워드의 :activity#
service#
receiver#
provider#
다음과 같은 결과를 얻을 수 있습니다.
activity#androidx.test.core.app.InstrumentationActivityInvoker$BootstrapActivity
ADDED from [androidx.test:core:1.2.0] C:\Users\Admin\.gradle\caches\transforms-3\709730c74fe4dc9f8fd991eb4d1c2adc\transformed\jetified-core-1.2.0\AndroidManifest.xml:27:9-33:20
- .
AndroidManifest.xml
이전 단계에서 찾은 파일, 유형의 항목이 있는지 검색합니다.activity
,service
,receiver
, 「」provider
「」가 않다.exported
엔트리의 에 대해서는, 다음의 「 entries」해 주세요.exported
속성)을 참조해 주세요.
(기입 시) 패스
--stacktrace
로케이션 정보는 포함되지 않았습니다;-)
발견된 항목 수정
생성되지 않은) 가 루트할 수 곳)에 , " " " " ( " " " " " " " " " " " " " " " " ( " " " " " ) " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "exported
필요성에 한다.false
와 같이 직접
<receiver
android:name="<name_of_the_entry>"
android:exported="false or true"
tools:node="merge" />
주의: 둘 다
android:exported="..."
★★★★★★★★★★★★★★★★★」tools:node="merge"
위에 설정되어 있습니다.
그러나 발견된 엔트리의 사양이 서드파티 라이브러리의 매니페스트(변경할 수 없는 실제 소스)에 쓰여져 있는 경우, 다음과 같이 루트 프로젝트의 매니페스트에 추가하여 해당 라이브러리의 사양을 덮어씁니다.
<provider
android:name="com.squareup.picasso.PicassoProvider"
android:exported="false"
tools:node="merge"
tools:overrideLibrary="com.squareup.picasso.picasso" />
이번에는 주의해 주세요.
tools:overrideLibrary="..."
설정도 되어 있습니다.상세한 것에 대하여는, 메뉴얼을 참조해 주세요.
SDK에서도 같은 문제가 발생합니다.
이러한 문제를 수정하는 것은 다소 번거로울 수 있습니다.IDE는 오류에 대한 자세한 내용을 제공하지 않고 내보낸 파라미터가 없는 Activity, Receiver 또는 Service가 있음을 알려 줄 뿐 어떤 것인지 알려주지 않습니다.Jakos가 권장하는 대로 병합된 매니페스트를 수동으로 확인하거나 생성된 매니페스트가 너무 큰 경우 이 스크립트를 사용할 수 있습니다.
그런 다음 내보낸 속성이 프로젝트의 일부인 경우 해당 속성을 추가하여 영향을 받는 항목을 수정하거나 라이브러리의 일부인 경우 재정의할 수 있습니다.
<activity android:name="name_of_the_activity_inside_library>"
android:exported="false|true"
tools:node="merge" />
업데이트: manifest merge 태스크는 Android S를 타겟으로 할 때 manifest를 생성하지 않으면 실패할 것 같고, 이 문제가 발견되므로 targetSdk보다 낮은 값을 사용하여 앱을 컴파일한 후 수동으로 또는 제가 링크한 스크립트를 사용하여 생성된 manifest를 검사하는 것이 좋습니다.(빌드 폴더에서 또는 생성된 apk를 검사하여 병합된 매니페스트를 찾을 수 있습니다.)
targetSdkVersion
으로
.compileSdkVersion
30분에
[실행]을 누릅니다.
test에서는 test를 compose test, compose test를 합니다.androidx.test.ext:junit
compose.ui 의존관계는
androidTestImplementation "androidx.test.ext:junit:1.1.3"
androidTestImplementation "androidx.compose.ui:ui-test-junit4:1.0.4"
해 주세요.build.gradle
다음 중 하나:
debugImplementation "androidx.fragment:fragment-testing:<version>"
존재하는 경우는, 다음과 같이 변경합니다.
androidTestImplementation "androidx.fragment:fragment-testing:<version>"
항상 그랬어야 했어androidTestImplementation
, '의존관계'를 .debugImplementation
회피책으로 사용합니다.IDE는 실제로 이 작업을 수행하도록 지시했습니다., SDK 되어 있기 31이 .debugImplementation은 debugImplementation으로 되어 있습니다.android:exported
" " " " 에서 하는 " " 。manifest.xml
종속 패키지에 포함되어 있습니다.
후 하여 맨 하면 AndroidManifest.xml이 를 확인할 수 .intent-filter
가지고 있지 않다exported=true
. 아니면 을 할 요.또는 에러를 일으키는 액티비티를 얻을 수 있습니다.
액티비티를 합니다.android:exported="true"
앱 및앱tools:node="merge"
그러면 내보낸 속성이 액티비티에 추가되어 오류가 발생합니다.§:
<activity
android:name="<activity which is giving error>"
android:exported="true"
tools:node="merge" />
이 작업은 한 번 수행해야 합니다. 라이브러리 개발자가 lib를 업데이트하면 제거할 수 있습니다.
타겟 sdk가 31 Android 12로 업데이트되므로 이를 위해 manifest.xml의 액티비티 런치에서 Android 내보내기를 수행해야 합니다.
android:exported="true"
제 경우 test:core:1.3.0이 문제였습니다(스크린샷 참조).
이 "Manifest Entry"를 해야 했다.android:exported
★★★★
<activity android:name="androidx.test.core.app.InstrumentationActivityInvoker$BootstrapActivity"
android:exported="true"
tools:node="merge"/>
<activity android:name="androidx.test.core.app.InstrumentationActivityInvoker$EmptyActivity"
android:exported="true"
tools:node="merge"/>
<activity android:name="androidx.test.core.app.InstrumentationActivityInvoker$EmptyFloatingActivity"
android:exported="true"
tools:node="merge"/>
<activity
android:name=".MainActivity"
android:exported="true" <** add this line on AndroidManifest.xml**
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
</activity>
무엇을 사용하여 코드를 작성하는지 잘 모르겠지만 Android Studio에서 설정하려면 프로젝트의 매니페스트를 열고 "활동" 섹션에 Android:discl="true"를 입력합니다(원하는 경우 false).예시를 첨부합니다.
앱이 Android 12 이상을 대상으로 하는 경우 앱의 매니페스트 파일에 이러한 속성 태그를 선언해야 합니다.앱 구성 요소에 런처 범주가 포함되어 있는 경우 android:exported를 true로 설정합니다.
<activity
android:name="com.test.activity.SplashActivity"
android:clearTaskOnLaunch="true"
android:label="@string/app_name"
android:launchMode="singleTop"
android:noHistory="true"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:exported="true">
또한 Android매니페스트에서 수신기 또는 서비스 세트를 사용 중인 경우 요구 사항에 따라 수신기 또는 서비스를 확인하십시오.
<receiver
android:name="com.test.receiver.ShareReceiver"
android:exported="true">
<intent-filter>
<action android:name="com.test.fcm.android.action.broadcast" />
</intent-filter>
</receiver>
<service
android:name="com.google.android.gms.tagmanager.InstallReferrerService"
android:exported="true" />
또한 모든 gradle 종속성을 업데이트하십시오.
요건에 따라 다음과 같은 의존관계를 갱신했습니다.
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test:runner:1.4.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'com.razorpay:checkout:1.6.15'
당신에게도 도움이 되길 바랍니다.
나는 안드로이드 12의 그 문제를 정확히 알고 있다.Android SDK에는 이미 버그가 발생하고 있습니다.이 문제의 해결 방법으로는 안드로이드 스튜디오에서 파일을 추가하여 이 방법을 실행할 수 있습니다.
그런 다음 def 메서드를 실행하고 구축해 보십시오.작업 방법을 시험하고 테스트합니다.
매니페스트 파일의 모든 요소에 내보내기를 추가해도 여전히 이 오류가 표시되는 경우 다음과 같이 하십시오.
- 프로젝트 디렉토리로 전환하여 app\build\margets\margets\margets_margets에서 병합 매니페스트
- intention-filter를 포함하며 속성을 내보내지 않은 구성 요소 검색
- 메인 매니페스트 파일에 복사하여 매니페스트 파일의 이 구성 요소를 재정의합니다.
힌트: 이미 파일을 생성하지 못했기 때문에 병합된 파일을 찾을 수 없는 경우.targetSdkVersion 30 및 compileSdkVersion 30으로 임시 다운그레이드하여 이 파일을 생성하고 위의 절차를 수행한 후 31(안드로이드 12)로 업그레이드합니다.
이 해결책을 여기서 찾았는데, 나한테는 효과가 있어.이것은 공식적인 면도기 페이 기써브에 의해 주어집니다.그들은 다음 릴리즈에서 고칠 것이라고 말했다.
<receiver
android:name="com.razorpay.RzpTokenReceiver"
android:exported="false">
<intent-filter>
<action android:name="rzp.device_token.share" />
</intent-filter>
</receiver>
<activity
android:name="com.razorpay.CheckoutActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:exported="true"
android:theme="@style/CheckoutTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<data
android:host="rzp.io"
android:scheme="io.rzp" />
</intent-filter>
</activity>
flatter를는, 「」업그레이드"flutter_local_notifications
최신 버전(현재는 9.3.2)으로 이 오류를 해결할 수 있습니다.
케이스 1: 서브 모듈 또는 라이브러리가 없음
이 문제는 SDK 31에서 시작되었습니다.라이브러리 또는 하위 모듈을 추가하지 않은 경우
android:exported="true" <!-- or false as required -->
태그를 오른쪽 클릭하면 Android Studio에서 제안합니다.
케이스 2: 서브 모듈 또는 라이브러리 사용
Import하는 다른 라이브러리 또는 모듈이 있는 경우 해당 라이브러리 또는 모듈도 재정의해야 합니다.자세한 내용은 'Merge Manifest' 탭을 참조하십시오.또는 열 수 있습니다.
<ProjectRoot> / app / build / intermediates / merged _ manifest / < your flavor > / Android Manifest . xml
편집자.Merge manifest는 Android Studio에서 검색할 수 없기 때문에 두 번째 방법을 선호합니다.
- 빌드 에러의 원인이 되고 있는<액티비티>,<리시버>등의 카피를 실시합니다.
- 메인 매니페스트에 붙여넣기
- 필요에 따라 Android:syslog="true" 또는 Android:sys="false"를 추가합니다.
- 재구축
케이스 3: 위의 어느 것도 기능하지 않는 경우
위의 어느 것도 작동하지 않으면 라이브러리 공급자가 필요한 변경을 할 때까지 기다려야 합니다.사용자가 변경할 때까지 SDK 버전을 30 이하로 되돌릴 수 있습니다.sdk를 내리면 문제가 일시적으로 해결됩니다.
문제는 오래된 힐트 버전 2.38.1을 사용하고 있다는 것입니다.
"com.google.dagger:hilt-android:2.38.1"
"com.google.dagger:hilt-android-gradle-plugin:2.38.1"
"com.google.dagger:hilt-android-compiler:2.38.1"
"com.google.dagger:hilt-android-testing:2.38.1"
후드 아래에 있는 "com.google.diag:hilt-diag-diag:2.38.1"은 내보낸 속성을 설정하는 코어 테스트 라이브러리 1.3.0에 의존합니다.
이 문제를 해결하려면 최신 단검 자루 버전(2.40.5가 작동)을 사용하고 있는지 확인합니다.
"com.google.dagger:hilt-android:2.40.5"
"com.google.dagger:hilt-android-gradle-plugin:2.40.5"
"com.google.dagger:hilt-android-compiler:2.40.5"
"com.google.dagger:hilt-android-testing:2.40.5"
이것은 타겟 업그레이드 후 가장 일반적인 문제입니다.SDK 32 또는 Android Studio(API Android 12 지원)
이 문제를 언급하는 것은 제 실수입니다.
오류는 다음과 같습니다.
Error:
android:exported needs to be explicitly specified for element <receiver#com.onesignal.BootUpReceiver>. 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. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
D:\iptvapp\iptvapp\app\src\main\AndroidManifest.xml:99:9-103:20 Error:
android:exported needs to be explicitly specified for element <receiver#com.onesignal.UpgradeReceiver>. 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. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
그런 다음 Libirary에서 병합된 Mainfest Clikc를 사용하여 instacne onesingal에 오류가 있습니다.
그런 다음 리시버 부분인 경우 오류를 복사하고 다음과 같이 메인 매니페스트 파일에 추가합니다.
Android: 개요
를 true로 설정합니다.
그리고 그들
<receiver android:name="com.onesignal.BootUpReceiver" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
</intent-filter>
</receiver>
<receiver android:name="com.onesignal.UpgradeReceiver" android:exported="true" >
<intent-filter>
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
</intent-filter>
</receiver>
아주 잘 작동했어요!
가 targeting 에되어 있는 이 에러는, build filetargeting sdk 31 에 .는 용 i i용었 i i i i i 。implementation
depend depend depend depend depend depend depend depend depend depend depend depend depend 가 아닌 나의 testImplementation
.
이 없는 에 볼수.InstrumentedActivity
이 빠지겠죠?exported=true
syslog.syslog.syslog.
모든 종속성을 업데이트하면 됩니다.
Android 12에서의 동작 변경에 대한 공식 문서를 인용하여 다음을 포함하는 작업을 찾아야 합니다.intent-filter
은 업데이트 할입니다. 것들은 명시적으로 을 설정해서 업데이트 할 필요가 있습니다.android:exported
.
빌드 로그는 빌드를 중지한 선언되지 않은 내보내기 플래그가 있는 액티비티를 정확하게 가리킵니다. 줄 .install
gradle 명령어:
> java.util.concurrent.ExecutionException: com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/xxxxx.tmp/base.apk (at Binary XML file line #129): YOUR.FULLY.QUALIFIED.NAME.FAILING.ACTIVITY: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present
YOUR.FULLY.QUALIFIED.NAME.FAILING.ACTIVITY
는 빌드를 차단하고 있는 특정 액티비티를 가리킵니다.
여기에도 설정의 의미에 대한 링크가 있습니다.android:exported
.
Flutter를 아직 사용하는 데 문제가 있는 사용자는 어플리케이션의 <액티비티>에 export=true를 넣는 것 외에 설치된 플러그인의 <액티비티>에 넣어야 합니다.simpleauthflutter 패키지를 사용하면 Androidmanifest에서 액티비티가 생성되어 export=true로 되어 있습니다.그게 일을 하는 유일한 방법이야.다음과 같이 표시됩니다.
더하다
tools:node="merge"
로.
<activity...
및 업그레이드
androidx.core.test
최신 버전으로 업그레이드합니다.
마법처럼 작동한다 :)
임시 해결 방법
compileSdk, targetSdk를 변경하다
compileSdk 30 targetSdk 30
그래들 종대로
언급URL : https://stackoverflow.com/questions/68554294/androidexported-needs-to-be-explicitly-specified-for-activity-apps-targeting
'programing' 카테고리의 다른 글
Vue - 여러 확인란이 있는 입력 (0) | 2023.01.31 |
---|---|
MySQL에서 "오버헤드"는 무엇을 의미하며, 무엇이 문제이며, 어떻게 수정해야 합니까? (0) | 2023.01.31 |
Redux 앱에서 localStorage에 쓸 수 있는 위치 (0) | 2023.01.21 |
unix_timestamp(MySQL)의 데이터 유형은 무엇입니까? (0) | 2023.01.21 |
javascript에서 숫자를 반올림하는 방법은 무엇입니까? (0) | 2023.01.21 |