<sync-adapter> 元素无法识别
<sync-adapter> element is not recognized
当我尝试在我的应用程序中实现 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 工作室中),但 <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" />
当我尝试在我的应用程序中实现 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 工作室中),但 <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" />