Google 통합을 통해 얻은 링크에서 이미지를 검색하려고하는 앱이 있습니다. 그러나, 언제든지 비트 맵으로 그림을 가져 오려고 할 때마다 항상 오류가 발생합니다. 코드 및 오류는 다음과 같습니다 :google 프로필 사진 URL에서 비트 맵을 가져올 수 없습니다.
코드 :
if (google_user_gallery_pic.isEmpty() == true)
{
if (google_user_pic.isEmpty() == false)
{
onPost = null;
onPost2 = null;
onPost = getBitmapFromURL(google_user_pic);
onPost2 = onPost2.createScaledBitmap(onPost, 100, 100, false);
}
else
{
onPost = null;
onPost2 = null;
onPost = BitmapFactory.decodeFile(google_user_gallery_pic);
if (onPost == null)
{
onPost2 = BitmapFactory.decodeResource(getResources(), R.drawable.the_smallperson);
}
else
{
onPost2 = onPost2.createScaledBitmap(onPost, 100, 100, false);
}
}
}
else
{
onPost = null;
onPost2 = null;
onPost = BitmapFactory.decodeFile(google_user_gallery_pic);
if (onPost == null)
{
onPost2 = BitmapFactory.decodeResource(getResources(), R.drawable.the_smallperson);
//onPost2 = onPost2.createScaledBitmap(onPost, 100, 100, false);
}
else
{
onPost2 = onPost2.createScaledBitmap(onPost, 100, 100, false);
}
}
오류 :
E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: https:/lh3.googleusercontent.com/-HW5Tk9h1V2I/AAAAAAAAAAI/AAAAAAAADA8/7UbMeHbyFLM/photo.jpg: open failed: ENOENT (No such file or directory)
의 URL :
https://lh3.googleusercontent.com/-HW5Tk9h1V2I/AAAAAAAAAAI/AAAAAAAADA8/7UbMeHbyFLM/photo.jpg
URL을 한 페이지 만에 나던 작업에서 작동 다른. 두 페이지 모두 조각 활동입니다. 어떤 도움을 주시면 감사하겠습니다.
: Gradle을 추가에
? – rafsanahmad007
@ rafsanahmad007 idk 사용 방법 –
파일에 비트 맵을 저장 했습니까? 열려고합니까? – rafsanahmad007