AndroidManifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.m.e"
android:versionCode="5"
android:versionName="3.0">
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<activity
android:name="com.m.e"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:configChanges="orientation|keyboardHidden">
<intent-filter>
<action
android:name="android.intent.action.MAIN"
/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity
android:name="com.m.e"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:configChanges="orientation|keyboardHidden">
<intent-filter>
<action
android:name="android.intent.action.first"
/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
.....
</application>
</manifest>
Error :
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.m.e/.Splash }
Error type 3
Error: Activity class {com.m.e/com.m.e.Splash} does not exist.
Note: .Splash
does exist.
In my case I tried all mentioned here and they didn't fix my problem. The problem was not in Android Studio but in device instead. And after I resetted my Android device to factory settings (as described here https://support.google.com/android-one/answer/6088915?hl=en) the problem disappeared.
Yes I know there's already an accepted answer for this but its not working (or may no longer working). Currently at Android 8.0 Oreo version, there's is a chance that your app may be uninstalled on your device "But not for all user". So the next time you debug your App with your device this error happens.
Heres how you fix it which absolutely works (searched for it for 2 days trust me)
If you can still see your App under Settings > App > Select your app and go to option on its Toolbar and select "Uninstall For All User"
If your app is not on the App list, generate/build an APK, in my case (Android Studio 3.0.1) you can go to Build > Build Apk. Install it manually on your device. Then do Step 1.
There ! Your app is all cleaned app and perfectly uninstalled. You can now debug it with development environment.
For further research : I believe Samsung Pass app has something to do with this error. Even after Uninstall. My project is still on their list.
Happy Codings Cheers !
In
build.gradle
, the line:needs changed to:
I got this error on Android O (Google Pixel C).I think i will get on other devices also.
I tried to install (from AndroidStudio) to any device it was fine, but not on Android O. On Android o I was getting same error (as given below).
The root cause. I have two users on that device (user1, user2). When I uninstall the app from user1 (the app is still there in user2). When I try to reinstall the app on user1 it returns the error.Same case in user2. To resolve the issue if I uninstall the app from both the users and re-install it works.
From command link if we use "adb install -r example.apk" it works, but AndroidStudio is not doing uninstall and reinstall (if you have two users in the device).
So in my case its was because of more than one user issue. All my other device (other than Android O) are single user, that is the reason, it was working on other devices, except on Pixel C (with two users). So watch out for multi user device.
In build.gradle,
change
to
If your build.gradle already has
apply plugin: android-library
then try to clean your project.I had similar issue that I couldn't find a solution after searching and trying fixes from here and there. The only thing worked for me is creating a new project, copying all the codes in the old activities and pasting them to the new created activities (similar names but different package). It worked very good. I tried before changing the package name but it didn't work. It might work for you guys.