我输入了这样的权限错误:
12-10 11:40:16.299: E/AndroidRuntime(1418): java.lang.SecurityException: Permission Denial: opening provider com.google.android.gms.games.provider.GamesContentProvider from ProcessRecord{437fc7e8 1418:com.papa.games.bc/u0a276} (pid=1418, uid=10276) that is not exported from uid 10020
我的代码就像这样
Bitmap bm = null;
try {
bm = MediaStore.Images.Media.getBitmap(this.getContentResolver(), getGamesClient().getCurrentPlayer().getIconImageUri());
} catch (FileNotFoundException e) {
Log.i("TAG", "FileNotFoundException", e);
} catch (IOException e) {
Log.i("TAG", "IOException", e);
}
如何解决这个问题?
答案 0 :(得分:3)
您必须使用其中一种ImageManager方法从Google Play服务中加载图片。这些处理缓存和加载 - 您只需要显示返回的Drawable
或使用loadImage(imageView, uri)
直接加载到ImageView
。