0

I'm facing the following error:

Error while executing: am start -n "com.package/com.package.SplashActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.package/.SplashActivity } Error type 3 Error: Activity class {com.package/com.package.SplashActivity} does not exist. Error while Launching activity

So what can I do to resolve this issue

Android Manifest:

<?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.company.xyz">

    <application
        android:name="GoogleAnalyticsApp"
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:largeHeap="true"
        android:theme="@style/MyMaterialTheme">

        <activity
            android:name=".SplashActivity"
            android:screenOrientation="portrait">
            <!-- For Pushwoosh we have to set following code: -->
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <intent-filter>
                <action android:name=".MESSAGE" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.SEND" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:mimeType="text/plain" />
            </intent-filter>
        </activity>
    </application>
</manifest>

I have added Manifest file also in that you can see what I need to change and I am using push for notification.

Thanks for the help in advance.

Edited : com.company.xyz packagename which is same in other build.gradle and manifest

I have checked both files are having same package name and the application is running in all device but when i try to run it on OREO it not launching activity.

Siddharth Patel
  • 205
  • 1
  • 13

3 Answers3

1

OP, Have you found a solution for this?

I had the same issue using a splash screen in android o. It was caused by the custom theme I was using before O. Are you using a custom theme for that activity?

If so, this solution might help you.

The custom theme had this code

 <item name="android:windowBackground">@drawable/background_splash</item>

but android O seems to crash with it so try this solution that I used to solve my issue

Create a new value-v26/styles.xml then add the code below in that xml

<style name="Splashscreen" parent="Theme.AppCompat.NoActionBar">
    <item name="android:windowSplashscreenContent">@drawable/splashscreen</item>

Replace the background drawable with your own.

The full detail of the solution is from this post by Omkar Amberkar

uncannyj
  • 136
  • 6
0

make sure in android manifest file in your SplashActivity is call first like below code..

<activity
    android:name=".activity.SplashActivity"><!--activity is package name. hear pass your first activity to load app start-->
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />

        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
</activity>
Reaz Murshed
  • 23,691
  • 13
  • 78
  • 98
  • I think the activity entry is already in the manifest. I have already marked the question as a duplicate of another answer. From my point of view, I think the activity package has renamed and that doesn't have proper reflection in the manifest file which is causing the error. Please look closely in the error. – Reaz Murshed Apr 18 '18 at 07:16
0

Activity class {com.package/com.package.SplashActivity} does not exist.

I think the activity class package name or the manifest declaration along with the fully specified package name is missing in your case.

Reaz Murshed
  • 23,691
  • 13
  • 78
  • 98