<同步适配器>元素无法识别
问题描述:
当我试图实现我的应用程序的Sync Adapter Framework运行应用程序之前,将出现以下错误:<同步适配器>元素无法识别
No resource identifier found for attribute 'contentAuhority' in package 'android'
我syncadapter.xml
资源文件
<?xml version="1.0" encoding="utf-8"?>
<sync-adapter xmlns:android="http://schemas.android.com/apk/res/android"
android:accountType="example.com"
android:allowParallelSyncs="false"
android:contentAuhority="my.authority"
android:isAlwaysSyncable="true"
android:supportsUploading="false"
android:userVisible="true" />
注:<sync-adapter>
元素不会出现在建议中(在Android studio中),但会出现<account-authenticator>
。
答
使用此
<?xml version="1.0" encoding="utf-8"?>
<sync-adapter xmlns:android="http://schemas.android.com/apk/res/android"
android:accountType="example.com"
android:allowParallelSyncs="false"
android:contentAuthority="my.authority"
android:isAlwaysSyncable="true"
android:supportsUploading="false"
android:userVisible="true" />
是你的XML文件,我的文件之间的差异? –
检查android:contentAuthority拼写 –