客户经理:Android App未显示在"设置"的"帐户"标签下,

Abh*_*hik 7 android accountmanager android-syncadapter

我正在尝试将我的应用程序设置为"帐户部分".因此,当用户点击添加帐户时,我的应用名称可见.完整的代码可以在这里找到 我创建了一个身份验证服务.这就是我的清单的样子

<service android:name=".AuthenticatorService">
        <intent-filter>
            <action android:name="android.accounts.AccountAuthenticator" />
        </intent-filter>
        <meta-data android:name="android.accounts.AccountAuthenticator"
                   android:resource="@xml/authenticator" />
    </service>
Run Code Online (Sandbox Code Playgroud)

我还创建了一个"authenticator.xml"

    <?xml version="1.0" encoding="utf-8"?>
<account-authenticator xmlns:android="http://schemas.android.com/apk/res/android"
                       android:accountType="com.udinic.auth_example"
                       android:icon="@drawable/ic_launcher"
                       android:smallIcon="@drawable/ic_launcher"
                       android:label="testing"
                       android:accountPreferences="@xml/prefs"/>
Run Code Online (Sandbox Code Playgroud)

但我仍然没有在帐户下看到我的应用程序.我正在关注本教程, 但它不起作用.你能告诉我我做错了什么吗?

小智 3

使用资源字符串而不是在标签中使用文字文本。

“验证器.xml”

android:label="@string/some_label"
Run Code Online (Sandbox Code Playgroud)