Search code examples
androidflutterandroid-manifest

When I install my application again then show Apps targeting Android 12 in flutter


enter image description here

How I fix this error \android\app\src\debug\AndroidManifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.app.kathana">
    <!-- The INTERNET permission is required for development. Specifically,
         the Flutter tool needs it to communicate with the running application
         to allow setting breakpoints, to provide hot reload, etc.
    -->
    <uses-permission android:name="android.permission.INTERNET"/>
</manifest>

build.gradle enter image description here How I fix it

debug console

D:\Working\Intern\Codes\Apps\kathana\android\app\src\debug\AndroidManifest.xml:27:9-33:20 Error: android:exported needs to be explicitly specified for element <activity#androidx.test.core.app.InstrumentationActivityInvoker$EmptyActivity>. 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:\Working\Intern\Codes\Apps\kathana\android\app\src\debug\AndroidManifest.xml:34:9-40:20 Error: android:exported needs to be explicitly specified for element <activity#androidx.test.core.app.InstrumentationActivityInvoker$EmptyFloatingActivity>. 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.

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:processDebugMainManifest'.

Manifest merger failed with multiple errors, see logs

  • Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

BUILD FAILED in 4s Exception: Gradle task assembleDebug failed with exit code 1

enter image description here enter image description here


Solution

  • I found the error . That's not "android:exported="true" " , I comment android build.gradle dependencies and run the project one by one. Finally I commented the "implementation 'com.facebook.android:facebook-android-sdk:latest.release'" this facebook dependencies then project worked prefect. But I want facebook dependencies for my project therefore I added newest dependencies " implementation 'com.facebook.android:facebook-login:5.+'"