5,814,981 Members 39,891 Now Online
XDA Developers Android and Mobile Development Forum

Android: Unfortunately the "app name" stopped! My first app

Tip us?
 
xemkruz2012
Old
#1  
Junior Member - OP
Thanks Meter 0
Posts: 3
Join Date: Mar 2014
Question Android: Unfortunately the "app name" stopped! My first app

I've just started to build my first android app and this 1st time errors are bugging me now since 2 days. Finding no solution I had to come here. I have been following Androids official tutorial for my first app and can't open my app.

Error: "Unfortunately "app name" has stopped"

Here is my manisfest file,
Code:
       <manifest xmlns:android=" removed due to new member at the forum warning! 10 posts minimum need to post link:(
    package="app2.android"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="17"
        android:targetSdkVersion="19" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
         
      <activity android:name="MainActivity" >
         <intent-filter>  
            <action android:name="android.intent.action.MAIN" />  
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
      </activity>
   
    </application>

</manifest>

Log Cat
03-10 08:59:54.310: D/dalvikvm(1671): Not late-enabling CheckJNI (already on)
03-10 08:59:54.400: D/AndroidRuntime(1671): Shutting down VM
03-10 08:59:54.400: W/dalvikvm(1671): threadid=1: thread exiting with uncaught exception (group=0xb2d88b20)
03-10 08:59:54.400: E/AndroidRuntime(1671): FATAL EXCEPTION: main
03-10 08:59:54.400: E/AndroidRuntime(1671): Process: app2.android, PID: 1671
03-10 08:59:54.400: E/AndroidRuntime(1671): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{app2.android/app2.android.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "app2.android.MainActivity" on path: DexPathList[[zip file "/data/app/app2.android-1.apk"],nativeLibraryDirectories=[/data/app-lib/app2.android-1, /vendor/lib, /system/lib]]
03-10 08:59:54.400: E/AndroidRuntime(1671): at android.app.ActivityThread.performLaunchActivity(A ctivityThread.java:2121)
03-10 08:59:54.400: E/AndroidRuntime(1671): at android.app.ActivityThread.handleLaunchActivity(Ac tivityThread.java:2245)
03-10 08:59:54.400: E/AndroidRuntime(1671): at android.app.ActivityThread.access$800(ActivityThre ad.java:135)
03-10 08:59:54.400: E/AndroidRuntime(1671): at android.app.ActivityThread$H.handleMessage(Activit yThread.java:1196)
03-10 08:59:54.400: E/AndroidRuntime(1671): at android.os.Handler.dispatchMessage(Handler.java:10 2)
03-10 08:59:54.400: E/AndroidRuntime(1671): at android.os.Looper.loop(Looper.java:136)
03-10 08:59:54.400: E/AndroidRuntime(1671): at android.app.ActivityThread.main(ActivityThread.jav a:5017)
03-10 08:59:54.400: E/AndroidRuntime(1671): at java.lang.reflect.Method.invokeNative(Native Method)
03-10 08:59:54.400: E/AndroidRuntime(1671): at java.lang.reflect.Method.invoke(Method.java:515)
03-10 08:59:54.400: E/AndroidRuntime(1671): at com.android.internal.os.ZygoteInit$MethodAndArgsCa ller.run(ZygoteInit.java:779)
03-10 08:59:54.400: E/AndroidRuntime(1671): at com.android.internal.os.ZygoteInit.main(ZygoteInit .java:595)
03-10 08:59:54.400: E/AndroidRuntime(1671): at dalvik.system.NativeStart.main(Native Method)
03-10 08:59:54.400: E/AndroidRuntime(1671): Caused by: java.lang.ClassNotFoundException: Didn't find class "app2.android.MainActivity" on path: DexPathList[[zip file "/data/app/app2.android-1.apk"],nativeLibraryDirectories=[/data/app-lib/app2.android-1, /vendor/lib, /system/lib]]
03-10 08:59:54.400: E/AndroidRuntime(1671): at dalvik.system.BaseDexClassLoader.findClass(BaseDex ClassLoader.java:56)
03-10 08:59:54.400: E/AndroidRuntime(1671): at java.lang.ClassLoader.loadClass(ClassLoader.java:4 97)
03-10 08:59:54.400: E/AndroidRuntime(1671): at java.lang.ClassLoader.loadClass(ClassLoader.java:4 57)
03-10 08:59:54.400: E/AndroidRuntime(1671): at android.app.Instrumentation.newActivity(Instrument ation.java:1061)
03-10 08:59:54.400: E/AndroidRuntime(1671): at android.app.ActivityThread.performLaunchActivity(A ctivityThread.java:2112)
03-10 08:59:54.400: E/AndroidRuntime(1671): ... 11 more

I have been rolling all over the internet for solutions, tried so many, doesn't work!!! PLEASE HELP!
 
arpitkh96
Old
#2  
arpitkh96's Avatar
Senior Member
Thanks Meter 384
Posts: 1,093
Join Date: Feb 2012
Location: panipat
Activity name change to
.MainActivity in manifest

Sent from my GT-S7392 using XDA Premium 4 mobile app
 
xemkruz2012
Old
#3  
Junior Member - OP
Thanks Meter 0
Posts: 3
Join Date: Mar 2014
Quote:
Originally Posted by arpitkh96 View Post
Activity name change to
.MainActivity in manifest

Sent from my GT-S7392 using XDA Premium 4 mobile app
i did. Same error!
 
jdroidsoft
Old
#4  
Junior Member
Thanks Meter 1
Posts: 11
Join Date: Mar 2014
Try writing the full package name to instead of just "MainActivity"

<activity android:name="app2.android.MainActivity" >
 
GRYMALA
Old
#5  
Junior Member
Thanks Meter 6
Posts: 19
Join Date: May 2014
In the manifest change your activity name to <activity android:name="app2.android.MainActivity" > and also make sure that your project src folder has correct package inside (named app2.android)
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes