首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >当在其他手机上工作正常时,应用程序在nexus上崩溃

当在其他手机上工作正常时,应用程序在nexus上崩溃
EN

Stack Overflow用户
提问于 2013-05-06 17:30:48
回答 1查看 457关注 0票数 0

我在应用程序上工作,显示从特定文件夹到网格视图的图像列表。它在所有设备上都工作得很好,但当我试图在nexus7“平板电脑上测试它时,它却崩溃了。

下面是我得到的崩溃日志。

代码语言:javascript
运行
复制
05-05 10:54:02.478  4246  4246 W Bundle  : Key android.intent.extra.TEXT expected ArrayList<CharSequence> but value was a java.lang.String.  The default value <null> was returned.
05-05 10:54:02.488  4246  4246 W Bundle  : Attempt to cast generated internal exception:
05-05 10:54:02.488  4246  4246 W Bundle  : java.lang.ClassCastException: java.lang.String cannot be cast to java.util.ArrayList
05-05 10:54:02.488  4246  4246 W Bundle  :  at android.os.Bundle.getCharSequenceArrayList(Bundle.java:1334)
05-05 10:54:02.488  4246  4246 W Bundle  :  at android.content.Intent.getCharSequenceArrayListExtra(Intent.java:4414)
05-05 10:54:02.488  4246  4246 W Bundle  :  at android.content.Intent.migrateExtraStreamToClipData(Intent.java:6872)
05-05 10:54:02.488  4246  4246 W Bundle  :  at android.content.Intent.migrateExtraStreamToClipData(Intent.java:6840)
05-05 10:54:02.488  4246  4246 W Bundle  :  at android.app.Instrumentation.execStartActivity(Instrumentation.java:1411)
05-05 10:54:02.488  4246  4246 W Bundle  :  at android.app.Activity.startActivityForResult(Activity.java:3370)
05-05 10:54:02.488  4246  4246 W Bundle  :  at android.app.Activity.startActivityForResult(Activity.java:3331)
05-05 10:54:02.488  4246  4246 W Bundle  :  at android.app.Activity.startActivity(Activity.java:3566)
05-05 10:54:02.488  4246  4246 W Bundle  :  at android.app.Activity.startActivity(Activity.java:3534)
05-05 10:54:02.488  4246  4246 W Bundle  :  at com.mxtech.logcollector.ActivityCollector.collectAndSend(ActivityCollector.java:354)
05-05 10:54:02.488  4246  4246 W Bundle  :  at com.mxtech.logcollector.ActivityCollector.onClick(ActivityCollector.java:364)
05-05 10:54:02.488  4246  4246 W Bundle  :  at com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:166)
05-05 10:54:02.488  4246  4246 W Bundle  :  at android.os.Handler.dispatchMessage(Handler.java:99)
05-05 10:54:02.488  4246  4246 W Bundle  :  at android.os.Looper.loop(Looper.java:137)
05-05 10:54:02.488  4246  4246 W Bundle  :  at android.app.ActivityThread.main(ActivityThread.java:5041)
05-05 10:54:02.488  4246  4246 W Bundle  :  at java.lang.reflect.Method.invokeNative(Native Method)
05-05 10:54:02.488  4246  4246 W Bundle  :  at java.lang.reflect.Method.invoke(Method.java:511)
05-05 10:54:02.488  4246  4246 W Bundle  :  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
05-05 10:54:02.488  4246  4246 W Bundle  :  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
05-05 10:54:02.488  4246  4246 W Bundle  :  at dalvik.system.NativeStart.main(Native Method)
EN

Stack Overflow用户

发布于 2013-05-06 17:35:07

在进行到NULL的强制转换时,看起来像是一些AutoBoxing问题。尝试使用默认值!

票数 0
EN
查看全部 1 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/16395797

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档