FORUMS

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

3 posts
Thanks Meter: 0
 
By xemkruz2012, Junior Member on 11th March 2014, 02:29 AM
Post Reply Subscribe to Thread Email Thread
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!
 
 
11th March 2014, 03:24 AM |#2  
arpitkh96's Avatar
Senior Member
Flag panipat
Thanks Meter: 585
 
Donate to Me
More
Activity name change to
.MainActivity in manifest

Sent from my GT-S7392 using XDA Premium 4 mobile app
11th March 2014, 04:54 AM |#3  
OP Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by arpitkh96

Activity name change to
.MainActivity in manifest

Sent from my GT-S7392 using XDA Premium 4 mobile app

i did. Same error!
21st March 2014, 10:00 PM |#4  
Junior Member
Thanks Meter: 1
 
More
Try writing the full package name to instead of just "MainActivity"

<activity android:name="app2.android.MainActivity" >
6th May 2014, 11:50 AM |#5  
Junior Member
Thanks Meter: 6
 
More
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)
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes