我使用图书馆: https://github.com/lvillani/android-cropimage 用于在我的项目中添加裁剪 Activity 。我导入此库并添加到我的项目中,现在我正在编写以下代码:
String mPackage = "com.android.camera";
String mClass = ".CropImage";
intent.setComponent(new ComponentName(mPackage,mPackage+mClass));
startActivityForResult(intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);
它给出错误: 无法找到显式 Activity 类 {com.android.camera/com.android.camera.CropImage};您是否在 AndroidManifest.xml 中声明了此 Activity ?
我也尝试在我的项目中写入 AndroidManifest.xml,但仍然出现相同的错误。
最佳答案
第 1 步:添加 <activity>
list 中指向 com.android.camera.CropImage
的元素
第 2 步:使用 new Intent(this, com.android.camera.CropImage.class)
创建您的Intent
步骤#3:据我所知不应该有步骤#3
关于java - 无法启动裁剪 Activity (使用 github.com/lvillani/android-cropimage )库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9969175/