1
我試圖通過意圖選擇視頻文件並從視頻中提取元數據。Android:MediaMetadataRetriever導致「java.lang.RuntimeException:setDataSource failed:status = 0x80000000」
不過,我從用戶和報告一些錯誤報告以下情況除外:
Exception java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=12004, result=-1, data=Intent { dat=content://media/external/images/media/63141 flg=0x1 (has extras) }} to activity {my.app/my.app.VideoActivity}:
java.lang.RuntimeException: setDataSource failed: status = 0x80000000
這是斂元數據代碼:
protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
super.onActivityResult(requestCode, resultCode, intent);
Uri uri = intent.getData();
MediaMetadataRetriever retriever = new MediaMetadataRetriever();
try {
retriever.setDataSource(this, uri); // error occurs here
} catch (IllegalArgumentException e) {
e.printStackTrace();
} catch (SecurityException e) {
e.printStackTrace();
}
}
爲什麼例外出現,如何解決它?在最近的API版本的這個方法
你有什麼進展嗎?調查同樣的問題,但沒有成功,它只發生在我的測試中的KK設備上 –