-
Notifications
You must be signed in to change notification settings - Fork 386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
模拟器点击图片选择闪退 #161
Comments
日志如下: |
我也遇到了相同的问题 |
有人解决了么? |
下面的方法报错:
private void buildAlbumInfo(ContentResolver cr) {
String[] distinctBucketColumns = new String[]{Media.BUCKET_ID, Media.BUCKET_DISPLAY_NAME};
Cursor bucketCursor = null;
try {
bucketCursor = cr.query(Media.EXTERNAL_CONTENT_URI, distinctBucketColumns, "0==0)" + " GROUP BY(" + Media.BUCKET_ID, null,
Media.DATE_MODIFIED + " desc");
if (bucketCursor != null && bucketCursor.moveToFirst()) {
do {
String buckId = bucketCursor.getString(bucketCursor.getColumnIndex(Media.BUCKET_ID));
String name = bucketCursor.getString(bucketCursor.getColumnIndex(Media.BUCKET_DISPLAY_NAME));
AlbumEntity album = buildAlbumInfo(name, buckId);
if (!TextUtils.isEmpty(buckId)) {
buildAlbumCover(cr, buckId, album);
}
} while (bucketCursor.moveToNext());
}
} finally {
if (bucketCursor != null) {
bucketCursor.close();
}
}
}
The text was updated successfully, but these errors were encountered: