java - The application sati(process com.example.sati)has stopped unexpectedly.Please try again -


i making app in there splash class containing image display when app made run , class made adding , subtracting number , displayed after image appered first ....

manifest.xml

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.sati" android:versioncode="1" android:versionname="1.0" >  <uses-sdk     android:minsdkversion="8"     android:targetsdkversion="18" />// here shows warning saying"not targeting            latest versions of android; compatibility modes apply. consider testing , updating         version. consult android.os.build.version_codes javadoc details."  <application     android:allowbackup="true"     android:icon="@drawable/ic_launcher"     android:label="@string/app_name"     android:theme="@style/apptheme" >     <activity         android:name=".splashact" //it's class 'splash' containing image shows on start of app         android:label="@string/app_name" >         <intent-filter>             <action android:name="android.intent.action.main" />              <category android:name="android.intent.category.launcher" />         </intent-filter>     </activity>     <activity         android:name=".mainactivity"//it's class appear after 'splash class'          android:label="@string/app_name" >         <intent-filter>             <action android:name="com.example.sati.mainactivity" />              <category android:name="android.intent.category.default" />         </intent-filter>     </activity> </application>  </manifest> following code of xml file named splash <?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"  android:background="@drawable/splash"> </linearlayout> 

splash.java

package com.example.sati;  import android.app.activity;  import android.os.bundle;  public class splash extends activity {  @override protected void oncreate(bundle sidra) {     // todo auto-generated method stub     super.oncreate(sidra);     setcontentview(r.layout.splash);//splash class code   }   }      //all above mentioned code implementation of thenewboston tutorials 14 

logcat

    03-24 13:26:23.285: w/dalvikvm(328): threadid=1: thread exiting uncaught exception    (group=0x4001d800)     03-24 13:26:23.355: e/androidruntime(328): fatal exception: main     03-24 13:26:23.355: e/androidruntime(328): java.lang.runtimeexception: unable instantiate activity componentinfo{com.example.sati/com.example.sati.splashact}: java.lang.classnotfoundexception: com.example.sati.splashact in loader dalvik.system.pathclassloader[/data/app/com.example.sati-1.apk]     03-24 13:26:23.355: e/androidruntime(328):  @ android.app.activitythread.performlaunchactivity(activitythread.java:2585)     03-24 13:26:23.355: e/androidruntime(328):  @ android.app.activitythread.handlelaunchactivity(activitythread.java:2679)     03-24 13:26:23.355: e/androidruntime(328):  @ android.app.activitythread.access$2300(activitythread.java:125)     03-24 13:26:23.355: e/androidruntime(328):  @ android.app.activitythread$h.handlemessage(activitythread.java:2033)     03-24 13:26:23.355: e/androidruntime(328):  @ android.os.handler.dispatchmessage(handler.java:99)     03-24 13:26:23.355: e/androidruntime(328):  @ android.os.looper.loop(looper.java:123)     03-24 13:26:23.355: e/androidruntime(328):  @ android.app.activitythread.main(activitythread.java:4 627)     03-24 13:26:23.355: e/androidruntime(328):  @ java.lang.reflect.method.invokenative(native method)     03-24 13:26:23.355: e/androidruntime(328):  @ java.lang.reflect.method.invoke(method.java:521)     03-24 13:26:23.355: e/androidruntime(328):  @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:868)     03-24 13:26:23.355: e/androidruntime(328):  @ com.android.internal.os.zygoteinit.main(zygoteinit.java:626)     03-24 13:26:23.355: e/androidruntime(328):  @ dalvik.system.nativestart.main(native method)     03-24 13:26:23.355: e/androidruntime(328): caused by: java.lang.classnotfoundexception: com.example.sati.splashact in loader dalvik.system.pathclassloader[/data/app/com.example.sati-1.apk]     03-24 13:26:23.355: e/androidruntime(328):  @ dalvik.system.pathclassloader.findclass(pathclassloader.java:243)     03-24 13:26:23.355: e/androidruntime(328):  @ java.lang.classloader.loadclass(classloader.java:573)     03-24 13:26:23.355: e/androidruntime(328):  @ java.lang.classloader.loadclass(classloader.java:532)     03-24 13:26:23.355: e/androidruntime(328):  @ android.app.instrumentation.newactivity(instrumentation.java:1021)     03-24 13:26:23.355: e/androidruntime(328):  @ android.app.activitythread.performlaunchactivity(activitythread.java:2577)     03-24 13:26:23.355: e/androidruntime(328):  ... 11 more 

caused by: java.lang.classnotfoundexception: com.example.sati.splashact 

you have

public class splash extends activity { // activity name splash not splashact 

so change this

<activity     android:name=".splashact" 

to

<activity     android:name=".splash" 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -