Android 2.1的裁切图像失败 [英] Android 2.1 Crop Image Fail
问题描述
我跟着这个网页作物图像SD卡如何选择和Android的裁剪图像?结果
I followed this page to crop image on SDcard How to select and crop an image in android?
我放置在 /data/data/package.name/files ,code裁剪后的图像精细的作品在Android 2.2及以上,但是当我跑这code在Android 2.1 ,在选择区域之后,我想,然后点击保存,我总是得到失败粘结剂交易的错误。
i placed the cropped image in /data/data/package.name/files, code works fine on Android 2.2 and above but when i ran this code on Android 2.1, after selecting the region i want and click "Save" and i always got "FAILED BINDER TRANSACTION" error.
为什么,什么是错误?
推荐答案
您想是这样的: -
You want like this:-
下载示例: - https://github.com/lorensiuswlt/AndroidImageCrop
只有三个为Android 2.1的要求的变化: -
Only three changes required for android 2.1:-
-
在main.xml中 - >写WRAP_CONTENT代替matchparent
In main.xml -> write wrap_content instead of matchparent.
在AndroidManifest.xml中 - > <采用-SDK安卓的minSdkVersion =7/>
In AndroidManifest.xml -> <uses-sdk android:minSdkVersion="7" />
在default.properties - > 目标= Android的7
In default.properties -> target=android-7
好运。
这篇关于Android 2.1的裁切图像失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!