Manifest merger failed with multiple errors, see logs

I downloaded and installed Android Studio 2020.3.1 Patch 2 (Arctic Fox).
I am stuck at running Hello World.

> Task :app:processDebugAndroidTestManifest FAILED
C:\Users\my-username\AndroidStudioProjects\KotlinFun\app\build\intermediates\tmp\manifest\androidTest\debug\tempFile1ProcessTestManifest17198222102638040440.xml Error:
	android:exported needs to be explicitly specified for <activity>. 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 for details.

I have in my AndroidManifest.xml, android:exported=“true” :

                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />

So I am not sure what should I be editing. (I am targeting API 28 as per the video)

FYI: I had to change targetSdk from 31 to 28 in C:\Users\my-username\AndroidStudioProjects\KotlinFun\app\build.gradle to make it work.

android {
    compileSdk 31

    defaultConfig {
        applicationId ""
        minSdk 28
        targetSdk 28
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

Oh yikes! Sorry to hear that. Man, Android Studio can be rough. I’m currently working on a new course tho with a co-instructor that knows Android much better than me so hopefully if that all pans out, maybe Nov or Dec ZappyCode will have an up to date course for ya :smiley:

1 Like

I see that this was covered in the Virtual Devices video.

There are many issues with the new Kotlin.

The ‘kotlin-android-extensions’ Gradle plugin is deprecated. Please use this migration guide (Migrate from Kotlin synthetics to Jetpack view binding) to start working with View Binding (View Binding  |  Android Developers) and the ‘kotlin-parcelize’ plugin.

Gotcha. This is good info for the updated course