내가 장치의 메모리에서 이미지 경로를 얻을 안드로이드 API (23) 내 CircleImageView에 이미지를 설정하고 데이터베이스에이 문자열 경로를 저장하기 위해 노력하고있어에 이미지를 설정하지 않은 API 19 이전 버전에서 작동하지만 Android 버전 API 23을 사용하는 Genymotion의 가상 장치에서는 작동하지 않습니다. 선택한 이미지가 ImageView에 표시되지 않습니다.setImageDrawable는 API23
이mCurrentImagePath = FileUtils.getPath(getActivity(), selectedImageUri);
Log.d(TAG, "mCurrentImagePath: " + mCurrentImagePath);
// Update client's picture
if (mCurrentImagePath != null && !mCurrentImagePath.isEmpty()) {
fragmentEditPicture.setImageDrawable(new BitmapDrawable(getResources(),
FileUtils.getResizedBitmap(mCurrentImagePath, 512, 512)));
}
이미지 경로가 mCurrentImagePath: /storage/emulated/0/Download/56836_(5-27-2006 2-28-40)(1920x1200).JPG
이다 : 나는 이미지 뷰에 이런 식으로 이미지를 설정하고있다.
이것이 작동하지 않는 이유를 알고 계십니까?
런타임에 필요한 권한을 요청 했습니까? –
@OgnianGloushkov No. 오류 또는 예외가 발생하지 않습니다. 단지 이미지를 설정하지 않습니다. –