如下的报错:
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW cat=[android.intent.category.DEFAULT] dat=content://***.fileProvider/files_root/Android/data/***/cache/ofddata/5bd4483f46db4ea58fe3e7a0cb387cf8.ofd typ=application/ofd flg=0x10000003 }
解决办法:
在AndroidManifest.xml中的acitivyt添加intent-filter
<intent-filter>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
本文解决了Android应用中打开OFD文件时出现的ActivityNotFoundException错误。通过在AndroidManifest.xml文件中为activity添加适当的intent-filter标签,确保应用可以正确处理特定类型的文件意图。
8418





