Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/200.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android Crop加载错误的图像_Android_Image_Crop - Fatal编程技术网

Android Crop加载错误的图像

Android Crop加载错误的图像,android,image,crop,Android,Image,Crop,我有一个基本的android裁剪问题。当我启动活动时,它会加载很久以前使用过的相同图像,但不是实际图像。 有人知道这个错误吗 这是我的代码: Intent cropIntent = new Intent("com.android.camera.action.CROP"); cropIntent.setDataAndType(Uri.fromFile(new File(imagePath)), "image/*"); cropIntent.putExtra("crop", "true"); c

我有一个基本的android裁剪问题。当我启动活动时,它会加载很久以前使用过的相同图像,但不是实际图像。 有人知道这个错误吗

这是我的代码:

Intent cropIntent = new Intent("com.android.camera.action.CROP");

cropIntent.setDataAndType(Uri.fromFile(new File(imagePath)), "image/*");

cropIntent.putExtra("crop", "true");
cropIntent.putExtra("outputX", 256);
cropIntent.putExtra("outputY", 256);

cropIntent.putExtra("return-data", true);

startActivityForResult(cropIntent, CROP_CODE);
In imagePath是SD卡上实际图像的路径。但在种植活动中,有另一种形象