Issue
When I try to implement the Sync Adapter Framework in my application the following error appears before running the app :
No resource identifier found for attribute 'contentAuhority' in package 'android'
My syncadapter.xml resource file
<?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" />
Note: <sync-adapter> element does not appear in suggestions (in Android studio) but <account-authenticator> appears.
Solution
Use this
<?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" />
Answered By - Satender Kumar

0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.