我試圖從存儲加載圖像,但應用程序崩潰,並給了我這個錯誤:當從存儲的應用程序加載圖像崩潰
12-06 22:08:41.539: E/AndroidRuntime(28957): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=file://[email protected]:///storage/emulated/0/My Folder/1417896511752.jpg }
12-06 22:08:41.539: E/AndroidRuntime(28957): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1660)
12-06 22:08:41.539: E/AndroidRuntime(28957): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1430)
這是我的代碼,我使用
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse("file://" + bitmap + fileUri), null);
startActivity(intent);
return;
}
});
不知道我做錯了這裏,就好像我以前`刪除Uri.parse
(「文件.....)的意圖不工作;
可以在任何一個可以幫助我,請
謝謝
非常感謝!有用! – Allrounder 2014-12-06 20:33:32