Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Activity class {.....SplashActivity} does not exist

I got these error while run project on device:

Launching application:.Splash_Activity.
DEVICE SHELL COMMAND: am start -n ".Splash_Activity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=.Splash_Activity }
Error type 3
Error: Activity class {.Splash_Activity} does not exist.

I check my Android-Manifest file it is like

 <activity
        android:name=".SplashActivity"
        android:screenOrientation="portrait"
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen">

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

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

and Gradle is like:

apply plugin: 'com.android.library'

android {
    compileSdkVersion 21
    buildToolsVersion "21.0.2"

    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 21
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
allprojects {
    tasks.withType(JavaCompile) {
        options.compilerArgs << "-Xlint:deprecation" << "-Xlint:unchecked"
    }
}

repositories {
    jcenter()
}


dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:cardview-v7:+'
    compile 'com.google.android.gms:play-services:4.3.+'
    compile files('libs/GraphView-3.1.3.jar')
    compile files('libs/google-play-services.jar')
    compile files('libs/android-support-v4.jar')
    compile files('libs/bolts-android-1.1.2.jar')
    compile 'com.github.navasmdc:MaterialDesign:1.+@aar'
    compile files('libs/nineoldandroids-2.4.0.jar')
    compile 'com.android.support:appcompat-v7:22.0.0'
}

I also try so much by changing the package name and so on.. What should I do to solve this issue?

like image 280
Ambitious Person Avatar asked Mar 21 '15 07:03

Ambitious Person


3 Answers

2018... make sure the device has the app completely uninstalled. Go to your Apps in your settings and delete the reference to the app your trying to install.

like image 81
KING Avatar answered Nov 09 '22 20:11

KING


To resolve this issue:

  1. Clean the Project
  2. Deleted the Build directory
  3. Restart Android studio
  4. Rebuild the Project
  5. Run

I think the key is to restart your IDE.

Or Try adding

com.package.name.SplashActivity

Here change the package name accordingly

Source

like image 42
Fahim Avatar answered Nov 09 '22 21:11

Fahim


If app was installed before then you need to be sure app deleted for all users. (Old versions of Android cause that error.)

You could check it from phone Settings -> Apps and Notifications -> Application Informations -> Your App Name then click delete for all users button from right up corner menu.

like image 45
Ahmet Öztemiz Avatar answered Nov 09 '22 20:11

Ahmet Öztemiz