Application error in productivity in 2.1.2.2, etc., but works in 1.6

Hello friends,

I want to use Crop Activity, but it will crash like

for activity {com.CropActivity / com.CropActivity.CropActivity}: android.content.ActivityNotFoundException:

Its code works correctly in Andorid 1.6, but its Crash in 2.1 or 2.2. please give me a solution thanks in advance

This is my code to start working with the crop.

Intent i = new Intent("com.android.camera.action.CROP"); i.setClassName("com.android.camera","com.android.camera.CropImage"); i.setData(data.getData()); image.setImageURI(data.getData()); Log.d("Camera", "path: " + data.getData().getPath()); i.putExtra("noFaceDetection", false); i.putExtra("outputX", iconWidth); i.putExtra("outputY", iconHeight); i.putExtra("aspectX", iconWidth); i.putExtra("aspectY", iconHeight); i.putExtra("scale", true); i.putExtra("output", Uri.parse(iconUri)); i.putExtra("return-data", true); startActivityForResult(i, CROP_IMAGE); 
+4
source share
1 answer

If this is the default CropActivity, which exists in android by default, then this is not officially part of the API , so the intent line has probably changed.

See these links for possible solutions / alternatives.

+1
source

Source: https://habr.com/ru/post/1401375/


All Articles