Pessoal, boa noite.
Estou tentando criar a activity, mas estou encontrando o seguinte erro:
Task :app:processDebugMainManifest FAILED C:\Users\soude\AndroidStudioProjects\Propjeto1\app\src\main\AndroidManifest.xml Error: android:exported needs to be explicitly specified for . 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.
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
Execution failed for task ':app:processDebugMainManifest'.
Manifest merger failed : android:exported needs to be explicitly specified for . 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.
- 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.
Meu código MainActivity.java é:
package com.example.propjeto1;
import android.app.Activity;
public class MainActivity extends Activity {
}
Meu código AndroidManifest.xml é:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.propjeto1">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Propjeto1" >
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
Alguém saberia me ajudar? Muito obrigada