Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

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

OP xemkruz2012

11th March 2014, 03:29 AM   |  #1  
OP Junior Member
Thanks Meter: 0
 
3 posts
Join Date:Joined: Mar 2014
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, 04:24 AM   |  #2  
arpitkh96's Avatar
Senior Member
Flag panipat
Thanks Meter: 550
 
1,125 posts
Join Date:Joined: Feb 2012
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, 05:54 AM   |  #3  
OP Junior Member
Thanks Meter: 0
 
3 posts
Join Date:Joined: Mar 2014
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, 11:00 PM   |  #4  
Junior Member
Thanks Meter: 1
 
11 posts
Join Date:Joined: Mar 2014
Try writing the full package name to instead of just "MainActivity"

<activity android:name="app2.android.MainActivity" >
6th May 2014, 12:50 PM   |  #5  
Junior Member
Thanks Meter: 6
 
19 posts
Join Date:Joined: 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)
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes