Uncaught handler: thread main exiting due to uncaught exception

by ragu » Wed, 25 Mar 2009 01:33:22 GMT


Sponsored Links
 Hi when i am executing the code below in the android emulator i didn't
faced any problems in contrast when i executed from the AIDL phone, my
application got crashed any sugestions.

public boolean onOptionsItemSelected(MenuItem item) {
                        switch (item.getItemId()) {
                                case SET_RINGTONE :
 
Intent intent = new Intent(Intent.ACTION_PICK,
android.provider.MediaStore.Audio.Media.EXTERNAL_CONTENT_URI);
 
startActivityForResult(intent, 0);
.
..
..
..
..
}



The error i am getting is as below :

E/AndroidRuntime( 2137): Uncaught handler: thread main exiting due to
uncaught exception
E/AndroidRuntime( 2137): android.content.ActivityNotFoundException: No
Activity found to handle Intent { action=android.intent.action.PICK
data=content://media/external/audio/media }






--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. How do I split up or separate large XML layout files

My example is using the Tab layout (just consider the HelloTab one)
the main.xml contains the views for all the tabs.  Is their a way to
separate or reference another xml file so my main.xml doesn't look
like spaghetti at the end?

Below is the main.xml from the Hello TabWdiget...

<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@android:id/tabhost"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <LinearLayout
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">
        <TabWidget
            android:id="@android:id/tabs"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" />
        <FrameLayout
            android:id="@android:id/tabcontent"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent">
            <TextView
                android:id="@+id/textview1"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:text="this is a tab" />
            <TextView
                android:id="@+id/textview2"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:text="this is another tab" />
            <TextView
                android:id="@+id/textview3"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:text="this is a third tab" />
        </FrameLayout>
    </LinearLayout>
</TabHost>


I want to turn that into...

<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@android:id/tabhost"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <LinearLayout
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">
        <TabWidget
            android:id="@android:id/tabs"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" />
        <FrameLayout
            android:id="@android:id/tabcontent"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent">
           &Tab1.xml
           &Tab2.xml
           &Tab3.xml
        </FrameLayout>
    </LinearLayout>
</TabHost>


--~--~---------~--~----~------------~-------~--~----~

2. File created with MODE_WORLD_WRITABLE mode could be accessed directly, but not through content provider.

Um well you could also have a service with an interface that returns a
ParcelFileDescriptor, so there's another. :)










-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~---------~--~----~------------~-------~--~----~

3. build my apk with platform certificate in sd

4. File created with MODE_WORLD_WRITABLE mode could be accessed directly, but not through content provider.

5. best way to add some static text...

6. Drawing w/ Finger, Button, External

7. More efficient way to get the resource id of a drawable from its name than using getResources().getIdentifier()