Android:找不到同步适配器
为什么 Android 在我打电话时找不到我的同步适配器:
ContentResolver.setSyncAutomatically(account, "com.stevegrosbois.budget.provider", true);
我已经搜索了几个小时:
在日志中:
DEBUG/SyncManager(59): can't find a sync adapter for SyncAdapterType Key {name=com.stevegrosbois.budget.provider, type=com.stevegrosbois.budget.user}, removing settings for it
AndroidManifest.xmlsyncadapter.xml
<service android:name=".sync.SyncService" android:exported="true">
<intent-filter>
<action android:name="android.content.SyncAdapter" />
</intent-filter>
<meta-data android:name="android.content.SyncAdapter" android:resource="@xml/syncadapter" />
</service>
:
<sync-adapter xmlns:android="http://schemas.android.com/apk/res/android"
contentAuthority="com.stevegrosbois.budget.provider"
accountType="com.stevegrosbois.budget.user"
android:supportsUploading="true"
android:userVisible="true"
/>
我已经尝试了所有方法
现在我哭了:'(
Why Android don't find my sync adapter when i call :
ContentResolver.setSyncAutomatically(account, "com.stevegrosbois.budget.provider", true);
I have searched for hours :
In the Log :
DEBUG/SyncManager(59): can't find a sync adapter for SyncAdapterType Key {name=com.stevegrosbois.budget.provider, type=com.stevegrosbois.budget.user}, removing settings for it
AndroidManifest.xml
<service android:name=".sync.SyncService" android:exported="true">
<intent-filter>
<action android:name="android.content.SyncAdapter" />
</intent-filter>
<meta-data android:name="android.content.SyncAdapter" android:resource="@xml/syncadapter" />
</service>
syncadapter.xml :
<sync-adapter xmlns:android="http://schemas.android.com/apk/res/android"
contentAuthority="com.stevegrosbois.budget.provider"
accountType="com.stevegrosbois.budget.user"
android:supportsUploading="true"
android:userVisible="true"
/>
I have tried everything
And now i'm crying :'(
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
成立 !!!!
android:contentAuthority 而不是我的syncadapter.xml 文件中的 contentAuthority
以及 android:accountType 而不是 accountType
FOUND !!!!
android:contentAuthority instead of contentAuthority in my syncadapter.xml file
also android:accountType instead of accountType