Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

Dois erros na implementação do Activity

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

1 resposta
solução!

desculpem, um pouco para frente no material eu vi a solução. Só não sei como fecha o tópico rsrsrsrsr. Alguém pode fechar por favor?

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software