The Application Has Stopped Unexpectedly Please Try Again Fix

  1. cb03

    Thread Starter

    hi everybody.
    I'm writing a program based on the example on web. It's ok but when i run it, there is a dialog show"the application Hello Tab widget(process.com.goolke.packagea) has stopped unexpectedly. Please try again"
    I don't know why.
    Help me, please!!


    1. Download the Forums for Android™ app!


      Download

  2. cb03

    Thread Starter

    Here's the example I wrote. I try to debug it but I don't really understand that message. Could u see the code and help me a little???????????
    ~thanks so much~

    Attached Files:

  3. disco6stu9

    You made a couple of mistakes when copying this example from the Android site:

    Tab Layout | Android Developers

    1. You need to place the drawable (pictures + xml) resources in the res/drawable/ directory instead of res/drawable-hdpi/ directory.
    2. The xml files you created (ic_tab_artists.xml, etc.) have an extra <resources> + </resources> XML tag pair. You should remove these tags from all three ic_tab_* files.
    3. You need to update your Android manifest to define activities for ArtistsActivity, AlbumsActivity & SongsActivity (I think this step is not obvious from the web page).

  4. cb03

    Thread Starter

    There're 2 activities in the example below. But I just see an activity is defined in the Android manifest????? So I did the same with the example above( didn't defined 3 activities in the android manifest)
    Could u explain more for me?????

    Attached Files:

  5. disco6stu9

    I attached a working version of the sample you are building.

    The code written inside of onCreate instantiates three Intent objects. In order for these objects to work properly the Android Manifest needs define an Activity in the Android manifest in order to launch the appropriate code when you click on a Tab.

    Every Android manifest has at least one Activity definition - i.e. the one that is executed when the application launches. Typically, if your class extends Activity or some child class of Activity, then you will want to include information about this class in your Android activity.

    You can read more about Activities on the Android developer website:
    Activity | Android Developers

    Attached Files:

  6. anu8is

    Im having the same problem. can u help me

    Attached Files:

  7. androidhelper

    1) I created new drawable folder and copied all images and xml file in it
    2) Update the manifest xml file as shown below

    and it works

    Cheers guys :)

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.hellotabwidget" android:versionCode="1"
    android:versionName="1.0">
    <uses-sdk android:minSdkVersion="9" />

    <application android:icon="@drawable/icon" android:label="@string/app_name">
    <activity android:name=".AlbumsActivity" android:label="@string/app_name"
    android:theme="@android:style/Theme.NoTitleBar">
    </activity>
    <activity android:name=".ArtistsActivity" android:label="@string/app_name"
    android:theme="@android:style/Theme.NoTitleBar">
    </activity>
    <activity android:name=".SongsActivity" android:label="@string/app_name"
    android:theme="@android:style/Theme.NoTitleBar">
    </activity>

    <activity android:name=".HelloTabWidget" android:label="@string/app_name"
    android:theme="@android:style/Theme.NoTitleBar">
    <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
    </activity>

    </application>
    </manifest>

  8. ajaypatelaj

    it should be like this... for abow zip file

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.googke.packagea"
    android:versionCode="1"
    android:versionName="1.0">
    <application android:icon="@drawable/icon" android:label="@string/app_name">
    <activity android:name=".HelloTabWidget" android:label="@string/app_name"
    android:theme="@android:style/Theme.NoTitleBar">
    <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
    </activity>

    <activity android:name="ArtistsActivity" android:theme="@android:style/Theme.NoTitleBar" android:label="artists"></activity>
    <activity android:name="AlbumsActivity" android:theme="@android:style/Theme.NoTitleBar" android:label="albums"></activity>
    <activity android:theme="@android:style/Theme.NoTitleBar" android:name="SongsActivity" android:label="songs"></activity>
    </application>
    <uses-sdk android:minSdkVersion="7" />

    </manifest>

  9. shiva.kore

    Hi friends ,

    I am also getting error as "Application stopped unexpectedly". pls find here with attached code.

    Thanks.

    Attached Files:

  10. Stef4n

    hey, i've got the same problem,
    I checked all my files and compared them to the working version of disco6stu9
    and i haven't found any differences, except for var names

    please check my file and help me if u can, i'm already despaired of it

    Edit: Found the problem by myself. I had a 7 where a / should have been

    Attached Files:

  11. mokhtar_justm

    i have the same problem ... can u check it for me please ???

    thanks in advance

  12. rajeshvaddi

    Hope below could be a possible solution for the problem.

    Check the VM size of the Emulator so that its good enough to run your app in its VM. Check the Size of your . Keep it in min sized so that Emulator will not find any difficulties in executing your app..

    Cheers,

    Rajesh Vaddi

  13. markdroid1

    Hi guys i have the same problem..i am making an application with database. can you help me with this? please. thanks....

    Attached Files:

Share This Page

bryangoiderink.blogspot.com

Source: https://androidforums.com/threads/the-application-has-stopped-unexpectedly-please-try-again.68416/

0 Response to "The Application Has Stopped Unexpectedly Please Try Again Fix"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel