[android-developers] After downloading an application with two Launcher components from the Marketplace, clicking Open will cause a crash

2010-02-11 Thread Mobile
Create a sample application with two launcher icons.  For example,
two
components such as:

application ...
  activity ... android:name=TestActivity01
intent-filter
  action android:name=android.intent.action.MAIN /
  category android:name=android.intent.category.LAUNCHER /
/intent-filter
  /activity
  activity ... android:name=TestActivity02
intent-filter
  action android:name=android.intent.action.MAIN /
  category android:name=android.intent.category.LAUNCHER /
/intent-filter
  /activity
/application

Either install the application via downloading from the Marketplace,
or via
AppInstaller.  When the message box asks you if you would like to run
the
application, an exception is thrown:

02-03 16:42:44.270: ERROR/AndroidRuntime(395):
android.content.ActivityNotFoundException: Unable to find explicit
activity
class {com.xxx.xxx/com.android.internal.app.ResolverActivity}; have
you
declared this activity in your AndroidManifest.xml?
02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:
1
480)
02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
android.app.Instrumentation.execStartActivity(Instrumentation.java:
1454)
02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
android.app.Activity.startActivityForResult(Activity.java:2660)
02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
android.app.Activity.startActivity(Activity.java:2704)
02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
com.android.packageinstaller.InstallAppDone.onClick(InstallAppDone.java:
105
)
02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
android.view.View.performClick(View.java:2344)
02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
android.view.View.onTouchEvent(View.java:4133)
02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
android.widget.TextView.onTouchEvent(TextView.java:6504)
02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
android.view.View.dispatchTouchEvent(View.java:3672)
02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
com.android.internal.policy.impl.PhoneWindow
$DecorView.superDispatchTouchEv
ent(PhoneWindow.java:1712)
02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneW
indow.java:1202)
02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
android.app.Activity.dispatchTouchEvent(Activity.java:1987)
02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
com.android.internal.policy.impl.PhoneWindow
$DecorView.dispatchTouchEvent(P
honeWindow.java:1696)
02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
android.view.ViewRoot.handleMessage(ViewRoot.java:1658)
02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
android.os.Handler.dispatchMessage(Handler.java:99)
02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
android.os.Looper.loop(Looper.java:123)
02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
android.app.ActivityThread.main(ActivityThread.java:4203)
02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
java.lang.reflect.Method.invokeNative(Native Method)
02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
java.lang.reflect.Method.invoke(Method.java:521)
02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:
791)
02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
dalvik.system.NativeStart.main(Native Method)


The crash happens because com.android.internal.app.ResolverActivity
is
trying to find a (single) component which resolves the following
intent:
  action android:name=android.intent.action.MAIN /
  category android:name=android.intent.category.LAUNCHER /

Please note that this has been tested BOTH with the AppInstaller, and
the
actual Marketplace on a real device.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] After downloading an application with two Launcher components from the Marketplace, clicking Open will cause a crash

2010-02-11 Thread Mark Murphy
Bug reports really need to go to http://b.android.com. If you post this
there, and if you think of it, write back with a link to the issue, as I'd
like to keep an eye on this one.

Thanks!

 Create a sample application with two launcher icons.  For example,
 two
 components such as:

 application ...
   activity ... android:name=TestActivity01
 intent-filter
   action android:name=android.intent.action.MAIN /
   category android:name=android.intent.category.LAUNCHER /
 /intent-filter
   /activity
   activity ... android:name=TestActivity02
 intent-filter
   action android:name=android.intent.action.MAIN /
   category android:name=android.intent.category.LAUNCHER /
 /intent-filter
   /activity
 /application

 Either install the application via downloading from the Marketplace,
 or via
 AppInstaller.  When the message box asks you if you would like to run
 the
 application, an exception is thrown:

 02-03 16:42:44.270: ERROR/AndroidRuntime(395):
 android.content.ActivityNotFoundException: Unable to find explicit
 activity
 class {com.xxx.xxx/com.android.internal.app.ResolverActivity}; have
 you
 declared this activity in your AndroidManifest.xml?
 02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
 android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:
 1
 480)
 02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
 android.app.Instrumentation.execStartActivity(Instrumentation.java:
 1454)
 02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
 android.app.Activity.startActivityForResult(Activity.java:2660)
 02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
 android.app.Activity.startActivity(Activity.java:2704)
 02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
 com.android.packageinstaller.InstallAppDone.onClick(InstallAppDone.java:
 105
 )
 02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
 android.view.View.performClick(View.java:2344)
 02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
 android.view.View.onTouchEvent(View.java:4133)
 02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
 android.widget.TextView.onTouchEvent(TextView.java:6504)
 02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
 android.view.View.dispatchTouchEvent(View.java:3672)
 02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
 android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
 02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
 android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
 02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
 android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
 02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
 android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
 02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
 com.android.internal.policy.impl.PhoneWindow
 $DecorView.superDispatchTouchEv
 ent(PhoneWindow.java:1712)
 02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
 com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneW
 indow.java:1202)
 02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
 android.app.Activity.dispatchTouchEvent(Activity.java:1987)
 02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
 com.android.internal.policy.impl.PhoneWindow
 $DecorView.dispatchTouchEvent(P
 honeWindow.java:1696)
 02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
 android.view.ViewRoot.handleMessage(ViewRoot.java:1658)
 02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
 android.os.Handler.dispatchMessage(Handler.java:99)
 02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
 android.os.Looper.loop(Looper.java:123)
 02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
 android.app.ActivityThread.main(ActivityThread.java:4203)
 02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
 java.lang.reflect.Method.invokeNative(Native Method)
 02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
 java.lang.reflect.Method.invoke(Method.java:521)
 02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
 com.android.internal.os.ZygoteInit
 $MethodAndArgsCaller.run(ZygoteInit.java:
 791)
 02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
 02-03 16:42:44.270: ERROR/AndroidRuntime(395): at
 dalvik.system.NativeStart.main(Native Method)


 The crash happens because com.android.internal.app.ResolverActivity
 is
 trying to find a (single) component which resolves the following
 intent:
   action android:name=android.intent.action.MAIN /
   category android:name=android.intent.category.LAUNCHER /

 Please note that this has been tested BOTH with the AppInstaller, and
 the
 actual Marketplace on a real device.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to