2017-10-17 106 views
0

当我试图实现我的应用程序的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>

enter image description here

回答

0

使用此

<?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" /> 
+0

是你的XML文件,我的文件之间的差异? –

+0

检查android:contentAuthority拼写 –

相关问题