如下的报错:
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开发中遇到的问题——无法打开特定类型的文件导致的ActivityNotFoundException,并提供了解决方案,即通过在AndroidManifest.xml中为Activity添加特定的intent-filter来实现。
8418

被折叠的 条评论
为什么被折叠?



