5

Below manifest formation I am using into my project but whenever I am trying to run my emulator, I am getting below mentioned error. please give me a exact solution for solving the error.

Tools informations

Android studio 
Nexus S API 22 (android 5.1.1)

My Manifest file formate

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

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

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="app"
        android:supportsRtl="true"
        android:theme="@style/AppTheme" >

        <!-- Splash activity -->
        <activity
            android:name=".SplashActivity"
            android:label="app"
            android:theme="@android:style/Theme.Holo.Light.NoActionBar.Fullscreen">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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

        <!-- Login activity -->
        <activity
            android:name=".LoginActivity"
            android:label="app"
            android:theme="@android:style/Theme.Holo.Light.NoActionBar.Fullscreen">
        </activity>

        <!-- List activity -->
        <activity
            android:name=".listActivity"
            android:label="app"
            android:theme="@android:style/Theme.Holo.Light.NoActionBar.Fullscreen">
        </activity>
    </application>

</manifest>

My Error :

Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.info.androidapp/.SplashActivity }
Error type 3
Error: Activity class {com.example.info.androidapp/com.example.info.androidapp.SplashActivity} does not exist.

NOTE : Sometimes I am facing Unfortunately, the process com.android.phone has stopped alert into emulator!
android
  • 453
  • 3
  • 7
  • 14

11 Answers11

14

After searching it for so long what helped me was.

1) File -> Sync Project with Gradle Files.

Or

This helped me too.

2) Uninstalling the previous installed application from emulator/mobile and re-run it and install it again.

Maz341
  • 2,232
  • 15
  • 20
8

Uninstall your app via 'adb' in the terminal: adb uninstall com.example.yourapp

Alektas
  • 556
  • 4
  • 11
  • This answer helped me. In my case, I had uninstalled the app manually from a physical device and then later Android Studio was failing to install. After running this command, it started working. Thank you! – Babu James Apr 06 '20 at 18:52
  • @BabuJames You can vote up if my answer helped you ;) – Alektas Apr 07 '20 at 18:50
  • This one helped me. Studio would run my app on an AVD device without any difficulty but will refuse to run on my physical device. I removed it from everywhere in the normal methods but when `adb uninstall com.myapp` showed 'Success!' I knew it had been it and now the app runs again ! Thanks! – elig Jun 16 '20 at 23:28
6

I had to uninstall the app for all users.

If you have multiple users (e.g. a kids mode) on your device, uninstalling the app from homescreen only removes the app form the current user.

Go to Settings -> Apps -> (Your App) -> Open Popup Menu (by clicking on the three dots in top right corner) -> Uninstall for all Users

vorwerg-ni
  • 157
  • 1
  • 5
4

In build.gradle, the line:

 apply plugin: 'android-library'

needs changed to:

apply plugin: 'android'

Edit:

Solution is deprecated. Please use this:

apply plugin: 'com.android.application'
3

try this

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

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

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="app"
        android:supportsRtl="true"
        android:theme="@style/AppTheme" >

        <activity
            android:name=".SplashActivity"
            android:label="app"
            android:theme="@android:style/Theme.Holo.Light.NoActionBar.Fullscreen">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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

        <!-- Login activity -->
        <activity
            android:name=".LoginActivity"
            android:label="app"
            android:theme="@android:style/Theme.Holo.Light.NoActionBar.Fullscreen">

        </activity>

        <activity
            android:name=".listActivity"
            android:label="app"
            android:theme="@android:style/Theme.Holo.Light.NoActionBar.Fullscreen">

        </activity>
    </application>

</manifest>

your Main Launcher activity always should be only ONE Activity.

Shishram
  • 1,514
  • 11
  • 20
1

Include the applicationId configuration in build.gradle if it doesn't already exist.

android {
    compileSdkVersion 18
    buildToolsVersion '19.0.0'

    defaultConfig {
        applicationId 'com.myapp.app'
        minSdkVersion 11
        targetSdkVersion 19
        versionCode 1
        versionName "1.0"
    }
}
Erick
  • 1,408
  • 14
  • 19
  • Do you know how the applicationId is cooked up if it's not explicit? I saw it in the error message, but couldn't find it anywhere in the project directory... Quite annoying to have some kind of magic working behind the scenes that's quite prone to failure in multi-module projects.... – Stefan Haustein Nov 30 '19 at 16:21
1

The solution to my problem was to uninstall an app from the app (Settings) folder in android because the app was just disabled.

Stig
  • 11
  • 2
1

I thing other solutoions will work fine for few user in my case i am using android 9 and i have multi user option enabled for system, it automatically install application for guest user, so goto
Settings>Apps>Concern App
And you will see uninstall for all user option at the top Option Menu. Uninstall and everything will work fine.

Azmat Karim Khan
  • 437
  • 5
  • 18
1

in my case this error sparsely appears in one project only and I can resolve it only uninstalling the app. the simplest way is to use Gradle:

ProjName->Tasks->install->uninstallAll
albaspazio
  • 121
  • 1
  • 6
0

The Uninstall your app via 'adb' in the terminal: adb uninstall com.example.yourapp

worked fine for me

0

for me, none of the solutions above worked for me what worked is invalidating cash fixed the problem