have you declared this Activity in your Androidmanifest.xml?

Asked

Viewed 948 times

2

Hello, I created a Data Input Activity and another one of "Result", when the button event is activated, to perform the calculations and open the Result Activity, the error appears that it was not declared in the manifest. Anyone can help?

My Manifest

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

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".Menu_Principal">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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


    </application>

</manifest>

Error inserir a descrição da imagem aqui

  • A Activity Upshot is in the same package of Main menu?

  • Forgive my lack of knowledge, but I could explain it better?

  • Se Activity Upshot is in the same "folder" of Main menu?

  • Yes, it is. " Uerj.normal"

  • There are the classes.

1 answer

2


The statement of Activity Upshot is inside a couple of tags <activity></activity>.

<activity android:name=".Entrada_Dados"> Falta um / antes de >
<activity android:name=".Resultado" />
</activity> Está a mais

Change so:

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity android:name=".Menu_Principal">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

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

</application>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.