Search code examples
androidandroid-studioandroid-manifestmanifest

I created a many Empty activity and show me error in Manifeast


enter image description here

I got error - Class referenced in the manifest, com.example.#.HomeActivity, was not found in the project or the libraries

I create a fresh application and i created only Empty activity and i got error in manifests and i dont know why ?

Please help

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

   <application
        android:allowBackup="true"
        android:dataExtractionRules="@xml/data_extraction_rules"
        android:fullBackupContent="@xml/backup_rules"
        android:icon="@drawable/logo"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.BachelorsTiffun"
        tools:targetApi="31">
        <activity
            android:name=".WelcomeSecondActivity" //error
            android:exported="false" />
        <activity
            android:name=".WelcomeFirstActivity"  //error
            android:exported="false" />
        <activity
            android:name=".GetLocationActivity"  //error
            android:exported="false" />
        <activity
            android:name=".OurServicesActivity"  //error
            android:exported="false" />
        <activity
            android:name=".Welcome.SplashScreenActivity"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>`

</manifest>

Solution

  • Please do like this, Initialize name with parent package name.

    <activity android:name=".parentPackage.WelcomeSecondActivity" 
                android:exported="false" />