본문 바로가기

개발하자

펄럭임/안드로이드: [...] 활동이 있지만 'android:exported' 속성이 없는 APK를 업로드했습니다. exported="true"가 작동하지 않음

반응형

펄럭임/안드로이드: [...] 활동이 있지만 'android:exported' 속성이 없는 APK를 업로드했습니다. exported="true"가 작동하지 않음

내부 테스트를 위해 앱을 구글 플레이 스토어에 업로드한 후 다음 오류 메시지가 표시됩니다:

You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without the 'android:exported' property set. This file can't be installed on Android 12 or higher. See: developer.android.com/about/versions/12/behavior-changes-12#exported

매니페스트에 다음과 같이 설정해 보았습니다:

<receiver 
    android:name="com.ryanheise.audioservice.MediaButtonReceiver"
    android:exported="true"
>            
    <intent-filter>
        <action android:name="android.intent.action.MEDIA_BUTTON" />
    </intent-filter>
</receiver>

하지만 여전히 같은 오류가 발생하고 있습니다. build.gradle 파일에는 다음과 같은 구성이 있습니다:

compileSdkVersion 31
minSdkVersion 21
targetSdkVersion 31

buildscript {
    ext.kotlin_version = '1.6.10'
    repositories {
        google()
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.google.gms:google-services:4.3.5'
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.5.1'
    }
}

다 해본 것 같아요. SDK 버전의 문제일 수도 있고, 여기서 누락된 것이 무엇입니까?




내보내기 수신기란 무엇입니까?

Android:vmdk. 브로드캐스트 수신기가 응용 프로그램 외부의 시스템이 아닌 소스로부터 메시지를 수신할 수 있는지 여부 - 가능한 경우 "true", 그렇지 않은 경우 "false".

AndroidManifest.xml 파일의 각 활동 페이지에 대해 내보낸 특성을 추가해야 합니다.

예:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.nisaefendioglu.weather">

    <uses-permission android:name="android.permission.INTERNET"></uses-permission>

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:usesCleartextTraffic="true"
        android:supportsRtl="true"
        android:theme="@style/Theme.AppCompat">
        <activity android:name="com.nisaefendioglu.weather.view.MainActivity"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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

</manifest>



또한 프로젝트 폴더에서 "flutter clean" 명령을 실행한 다음 "flutter pubget" 명령을 실행하여 .xml 파일과 같은 "필수" 파일을 수정할 때마다 변경 내용을 캡처해야 할 수도 있습니다.




승인된 답변은 모호한 정보를 제공하고 사람들이 해결책을 이해하기 위해 의견을 검토해야 하기 때문에 적절한 답변을 작성하겠습니다.

이 문제의 원인은 앱 파일에 선언된 구성 요소(활동, 서비스 또는 브로드캐스트 수신기) 중 하나에 속성이 없기 때문입니다. 나열된 모든 구성 요소는 보안상의 이유로 이 속성을 선언해야 합니다.

다음은 이러한 구성 요소의 속성에 대한 설명서입니다:

  • 활동:
  • 서비스:
  • 브로드캐스트 수신기:

반응형