多个图像选择器显示在android中找不到任何活动

时间:2016-06-14 12:04:30

标签: android

单击按钮时,应用程序崩溃并显示未找到任何活动.logcat错误显示在startActivityForResults的位置。如何开始这项活动。任何人都可以提供解决方案来纠正这个错误。

btnGalleryPickMul.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                Intent i = new Intent(Action.ACTION_MULTIPLE_PICK);
                startActivityForResult(i, 200);
            }
        });

    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if (requestCode == 200 && resultCode == Activity.RESULT_OK) {
            String[] all_path = data.getStringArrayExtra("all_path");

            ArrayList<CustomGallery> dataT = new ArrayList<CustomGallery>();


            for (String string : all_path) {
                CustomGallery item = new CustomGallery();
                item.sdcardPath = string;

                dataT.add(item);
                //
                String size=item.sdcardPath;
                Log.d("size--", size);
                image1.add(item.sdcardPath);
                Log.d("map--", String.valueOf(image1));


                ArrayList<String> ImgData =image1;
                Log.d("ImgData--", String.valueOf(ImgData));


                for (int i = 0; i < ImgData.size(); i++) {
                    map.add(ImgData.get(i).toString());


                }

            }

            viewSwitcher.setDisplayedChild(0);
            adapter.addAll(dataT);
//
//            new ImageUploadTask()
//                    .execute(count + "", "pk" + count + ".jpg");
        }
    }

Logcat错误:

E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.airstar.abservetech.airstar, PID: 25444
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=luminous.ACTION_MULTIPLE_PICK }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1687)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1479)
at android.app.Activity.startActivityForResult(Activity.java:3448)
at android.app.Activity.startActivityForResult(Activity.java:3409)
at com.airstar.abservetech.airstar.Add_room$5.onClick(Add_room.java:295)
at android.view.View.performClick(View.java:4446)
at android.view.View$PerformClick.run(View.java:18437)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5372)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:970)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:786)
at dalvik.system.NativeStart.main(Native Method)

0 个答案:

没有答案