Here are the steps to recreate the problem.
Step 1)
Create a dummy activity called Dummy.java and the code for that is
*******
public class Dummy extends Activity {
protected void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.dummy);
}
}
**********
step 2)
create dummy.xml with this content
*******
<?xml version="1.0" encoding="utf-8"?>
<TextView android:id="@+id/text_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent" android:padding="0px"
android:text="dummy" android:orientation="horizontal"
android:typeface="normal" android:textStyle="normal"
android:textColor="#ff000000" xmlns:android="http://
schemas.android.com/apk/res/android">
</TextView>
**********
step 3)
edit AndroidManifest.xml to add
*********
<activity android:name=".dummy.Dummy"
android:label="dummy">
<intent-filter>
<action
android:name="android.intent.action.MAIN" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.EDIT" />
<action android:name="android.intent.action.PICK" />
<category
android:name="android.intent.category.DEFAULT" />
<data android:mimeType="audio/mpeg" />
</intent-filter>
</activity>
*************
step 4)
deploy the activity, search and navigate to any mp3 file. You will see
the above "list view can't have unspecified size exception". For quick
test, this link could be helpful.
http://www.archive.org/download/BenWillemsTestwavTestmp3/Test_64kb.mp3.
My activity does render itself fine ( there is nothing really there in
it). When I try to open it via an intent and by hooking up the
mimetype, i get the error mentioned in this thread.
Please help.
-Pavan.
On Mar 31, 11:51 am, pavan <[EMAIL PROTECTED]> wrote:
> The stack trace is
> ***************
> ERROR/AndroidRuntime(660): java.lang.RuntimeException: List views
> can't have UNSPECIFIED size
> ERROR/AndroidRuntime(660): at
> android.widget.ListView.onMeasure(ListView.java:947)
> ERROR/AndroidRuntime(660): at android.view.View.measure(View.java:
> 5937)
> ERROR/AndroidRuntime(660): at
> android.widget.LinearLayout.measureHorizontal(LinearLayout.java:493)
> ERROR/AndroidRuntime(660): at
> android.widget.LinearLayout.onMeasure(LinearLayout.java:233)
> ERROR/AndroidRuntime(660): at android.view.View.measure(View.java:
> 5937)
> ERROR/AndroidRuntime(660): at
> android.widget.LinearLayout.measureVertical(LinearLayout.java:385)
> ERROR/AndroidRuntime(660): at
> android.widget.LinearLayout.onMeasure(LinearLayout.java:231)
> ERROR/AndroidRuntime(660): at android.view.View.measure(View.java:
> 5937)
> ERROR/AndroidRuntime(660): at
> android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:2251)
> ERROR/AndroidRuntime(660): at
> android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:
> 742)
> ERROR/AndroidRuntime(660): at
> android.widget.LinearLayout.measureHorizontal(LinearLayout.java:510)
> ERROR/AndroidRuntime(660): at
> android.widget.LinearLayout.onMeasure(LinearLayout.java:233)
> ERROR/AndroidRuntime(660): at android.view.View.measure(View.java:
> 5937)
> ERROR/AndroidRuntime(660): at
> android.view.ViewGroup.measureChild(ViewGroup.java:2219)
> ERROR/AndroidRuntime(660): at
> android.view.ViewGroup.measureChildren(ViewGroup.java:2193)
> ERROR/AndroidRuntime(660): at
> android.widget.AbsoluteLayout.onMeasure(AbsoluteLayout.java:60)
> ERROR/AndroidRuntime(660): at android.view.View.measure(View.java:
> 5937)
> ERROR/AndroidRuntime(660): at
> android.view.ViewGroup.measureChild(ViewGroup.java:2219)
> ERROR/AndroidRuntime(660): at
> android.widget.FrameLayout.onMeasure(FrameLayout.java:146)
> ERROR/AndroidRuntime(660): at android.view.View.measure(View.java:
> 5937)
> ERROR/AndroidRuntime(660): at
> android.widget.LinearLayout.measureVertical(LinearLayout.java:385)
> ERROR/AndroidRuntime(660): at
> android.widget.LinearLayout.onMeasure(LinearLayout.java:231)
> ERROR/AndroidRuntime(660): at android.view.View.measure(View.java:
> 5937)
> ERROR/AndroidRuntime(660): at
> android.view.ViewGroup.measureChild(ViewGroup.java:2219)
> ERROR/AndroidRuntime(660): at
> android.widget.FrameLayout.onMeasure(FrameLayout.java:146)
> ERROR/AndroidRuntime(660): at android.view.View.measure(View.java:
> 5937)
> ERROR/AndroidRuntime(660): at
> android.view.ViewGroup.measureChild(ViewGroup.java:2219)
> ERROR/AndroidRuntime(660): at
> android.widget.FrameLayout.onMeasure(FrameLayout.java:146)
> ERROR/AndroidRuntime(660): at android.policy.PhoneWindow
> $DecorView.onMeasure(PhoneWindow.java:1202)
> ERROR/AndroidRuntime(660): at android.view.View.measure(View.java:
> 5937)
> ERROR/AndroidRuntime(660): at
> android.view.ViewRoot.performTraversals(ViewRoot.java:341)
> ERROR/AndroidRuntime(660): at
> android.view.ViewRoot.handleMessage(ViewRoot.java:584)
> ERROR/AndroidRuntime(660): at
> android.os.Handler.dispatchMessage(Handler.java:80)
> ERROR/AndroidRuntime(660): at android.os.Looper.loop(Looper.java:
> 91)
> ERROR/AndroidRuntime(660): at
> android.app.ActivityThread.main(ActivityThread.java:3052)
> ERROR/AndroidRuntime(660): at
> java.lang.reflect.Method.invokeNative(Native Method)
> ERROR/AndroidRuntime(660): at
> java.lang.reflect.Method.invoke(Method.java:356)
> ERROR/AndroidRuntime(660): at android.os.ZygoteInit
> $MethodAndArgsCaller.run(ZygoteInit.java:1547)
> ERROR/AndroidRuntime(660): at
> android.os.ZygoteInit.main(ZygoteInit.java:1445)
> ERROR/AndroidRuntime(660): at
> android.dalvik.NativeStart.main(Native Method)
> ***********
> My code hasn't been called yet.
> On Mar 30, 9:45 pm, pavan <[EMAIL PROTECTED]> wrote:
>
> > I am running into exactly the same issue. App runs fine from eclipse
> > or when the resource path ( path to the downloaded file in sdcard) is
> > specified. But when launched from the browser, I get the exact same
> > stack trace. None of my activities uses listviews si I am sure the
> > problem lies somewhere else.Pavan.
> > On Feb 20, 10:57 am, baldmountain <[EMAIL PROTECTED]> wrote:
>
> > > A bit more information.
>
> > > Based on a post in another thread I tried adding the BROWSABLE
> > > category to my intent filter but that didn't seem to change anything.
>
> > > I also tried adding the SYSTEM_INTERNAL_WINDOW permission in case my
> > > app didn'thavethe correct permission with no effect.
>
> > > The more I think about it, the more sure I am that none of my code is
> > > running.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---