I\'m experimenting with Android AccountManager
.
I have an Account authentication service that shows UI to enter username/password.
I go to Setti
Thanks to @imran khan, I discovered that my constant value didn't match "exactly" what was in the authenticator XML definition
In my case I accidently defined AuthenticatorService in the Manifest outside the <application>
tags. Moving the declaration inside <application>
fixed the issue. Hope will help someone.
Seems obvious, but you will also see this error if your authenticator service has not been defined in AndroidManifest.xml. For example:
<service android:name="your.AuthService">
<intent-filter>
<action android:name="android.accounts.AccountAuthenticator" />
</intent-filter>
<meta-data android:name="android.accounts.AccountAuthenticator"
android:resource="@xml/authenticator" />
</service>
In my case, I got this error when I ran two different flavors on the same device. The second one was trying to access the same account as the first, which caused the error.