Uri에서 파일을 만들고 예외가 발생했습니다. 발생했습니다. 예외 값에 null이 표시됩니다. Uri에서 파일 생성 예외가 발생합니다.
try {
File mFile = new File(new URI(mediaUri.toString()));
data = readFile(mFile);
} catch (Exception e) {
Log.e("Error", e.getLocalizedMessage());
}
사전에
감사를 도와주세요.
@QBLive, 답을 편집하는 대신 질문이나 의견을 달아 주어야합니다. 혼란 스럽습니다. –
파일 경로 예 : file : ///tmp/android.txt. 문자열에는 uri가 필요하지 않습니다. 파일에 uri 매개 변수가있는 생성자가 있습니다. 참조 : http://developer.android.com/reference/android/net/Uri.html – Daniel