实验总结(包括实验数据分析、实验结果、实验过程中出现的问题及解决方法等): 问题:提示路径名未知 情况: 1、Unknown URI content://com.example.contentobserverdb/info 2、E/ActivityThread: Failed to find provider info for com.example.contentobserverdb 原因:没有在全局配置文件AndroidManifest.xml中对内容提供者进行注册 解决方法:在全局配置文件AndroidManifest.xml里添加以下代码,对内容提供者进行手动注册 (或者在程序包处单击右键,选择【New】->【other】->【Content Provider】选项,在弹出窗口输入内容提供者的【Class Name】和【URI Authorities】(通常使用包名),点击完成后Android Studio会自动完成注册。) <provider android:name=".PersonProvider" android:authorities="com.example.contentobserverdb" android:enabled="true" android:exported="true"></provider>
|
未知路径:Unknown URI content://com.example.contentobserverdb/info
猜你喜欢
转载自blog.csdn.net/qq_43505762/article/details/106524137
今日推荐
周排行