2017-10-17 46 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拼寫 –

相關問題