public static ArrayList<Media> getAllImageMedias(Context context) {
ArrayList<Media> imageMedias = new ArrayList<>();
Uri uri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI;
String[] projection = {MediaStore.Images.ImageColumns.DATA};
Cursor cursor = context.getContentResolver().query(
uri, projection, null,
null, null);
if (cursor != null) {
while (cursor.moveToNext()) {
imageMedias.add(new Media(cursor.getString(0), ""));
}
cursor.close();
}
return imageMedias;
}
看起来我在上面的功能中面临问题以获取设备中的图像列表。它在调试apk中工作正常,但是当上面的函数被调用时,应用程序在发布apk中崩溃。
我得到的错误是
java.lang.UnsatisfiedLinkError:从“/data/app/com.app.project/lib/arm/libimagepipeline.so”中的JNI_OnLoad返回的JNI_ERR