Error stating that Activity was not declared on Androidmanifest.xlm?

Asked

Viewed 160 times

0

This is the code of my Androidmanifest.xml:

<uses-permission android:name="android.permission.INTERNET" />

<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/AppTheme">
    <activity
        android:name=".Activitys.mainActivity"
        android:label="@string/app_name"
        android:theme="@style/AppTheme.NoActionBar">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity android:name=".Activitys.loginActivity" />
</application>

And this is the mistake:

Error running 'app': The Activity 'loginActivity' is not declared in Androidmanifest.xml

Img: inserir a descrição da imagem aqui

  • 1

    face only a hint, packet names are always lowercase, and class names always start with the first uppercase letter

1 answer

1

What can happen is that you have one more file loginActivity or it does not exist in this directory.

To make sure that there is or which one you are pointing to, specify the full path of Activity to find out if it really is correct.

You can declare this way:

<activity
   android:name="com.example.Activitys.loginActivity"
   android:label="@string/app_name" >
</activity>

Browser other questions tagged

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