ActivityNotFoundException: No Activity found to handle Intent
来源:互联网 发布:源码论坛eenot 编辑:程序博客网 时间:2024/06/05 23:48
E/AndroidRuntime: FATAL EXCEPTION: main Process: com.tencent.squeezencnn, PID: 607android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.PICK typ=image/* }at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1798)at android.app.Instrumentation.execStartActivity(Instrumentation.java:1512)at android.app.Activity.startActivityForResult(Activity.java:3930)at android.app.Activity.startActivityForResult(Activity.java:3890)at com.tencent.squeezencnn.MainActivity$1.onClick(MainActivity.java:75)at android.view.View.performClick(View.java:5204)at android.view.View$PerformClick.run(View.java:21155)at android.os.Handler.handleCallback(Handler.java:739)at android.os.Handler.dispatchMessage(Handler.java:95)at android.os.Looper.loop(Looper.java:148)at android.app.ActivityThread.main(ActivityThread.java:5422)at java.lang.reflect.Method.invoke(Native Method)at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
做从手机上取出图片时用Intent.ACTION_PICK,在使用过程中发现,有的手机正常,有的手机报错 ,
后来发现,原因在于对于Intent.ACTION_PICK认识不足。ACTION_PICK 是允许用户从已安装的应用程序注册为这种行动的任何图像中选择,报错的手机没有安装暴露有ACTION_PICK意图的软件,所以无法打开,出错!
知道了错误原因,问题就好解决了!
把如下的 Intent.ACTION_PICK改成Intent.ACTION_GET_CONTENT就ok了
@Override public void onClick(View v) { Intent getAlbum = new Intent(Intent.ACTION_GET_CONTENT); getAlbum.setType("image/*"); startActivityForResult(getAlbum, 0); }
阅读全文
0 0
- ActivityNotFoundException: No Activity found to handle Intent
- ActivityNotFoundException: No Activity found to handle Intent
- ActivityNotFoundException: No Activity found to handle Intent
- android.content.ActivityNotFoundException: No Activity found to handle Intent
- android.content.ActivityNotFoundException: No Activity found to handle Intent
- android.content.ActivityNotFoundException: No Activity found to handle Intent
- 隐试意图:ActivityNotFoundException: No Activity found to handle Intent
- android.content.ActivityNotFoundException: No Activity found to handle Intent
- android.content.ActivityNotFoundException: No Activity found to handle Intent
- android.content.ActivityNotFoundException: No Activity found to handle Intent
- android.content.ActivityNotFoundException: No Activity found to handle Intent
- 解决ActivityNotFoundException: No Activity found to handle Intent
- android.content.ActivityNotFoundException: No Activity found to handle Intent
- android.content.ActivityNotFoundException: No Activity found to handle Intent {
- android.content.ActivityNotFoundException: No Activity found to handle Intent
- ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.a
- ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.OPEN_DOCUM
- android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.a
- ReactiveCocoa入门教程:第三部分
- html5只需要-!DOCTYPE HTML-的原因
- 大型的网站的架构演化
- 数据结构学习笔记-Day1-最大子列和问题
- JQuery中$.ajax()方法参数详解
- ActivityNotFoundException: No Activity found to handle Intent
- Oracle 将表中多条数据同一字段拼成一列显示
- 嵌入式系统学习——S3C2451之linux驱动入门
- wordpress 页面属性无“模板”选项 我是如何搞定的
- VS2015编译报MS8020错误
- 融云消息昵称以及头像设置的方法
- bootstrap定义的标签
- node 第一记
- Java接入微信支付