Android.accounts.AuthenticatorException: binding failed

I get the following exception; I know that this is not so much, but there is practically no working documentation there. Suffice it to say that I have tried all examples of my own Authenticator implementation.

I found the suggested answer here to fix my manifest file (service declaration). If this has already been done, the problem persists.

My initial solution is based on in this example: write-your-own-android-authenticator

W/System.err﹕ android.accounts.AuthenticatorException: bind failure W/System.err﹕ at Android.accounts.AccountManager.convertErrorToException(AccountManager.java:2024) W/System.err﹕ at android.accounts.AccountManager.access$400(AccountManager.java:144) W/System.err﹕ at android.accounts.AccountManager$AmsTask$Response.onError(AccountManager.java:1867) W/System.err﹕ at android.accounts.IAccountManagerResponse$Stub.onTransact(IAccountManagerResponse.java:69) W/System.err﹕ at android.os.Binder.execTransact(Binder.java:446) 
+9
android
source share
2 answers

Bro, I had the same situation. Searched everywhere, but no luck. There are already very few resources and manuals for the Android authenticator. I also used the same udinic source : write your own underwriter authenticator .

It was a very lame and small mistake. I actually changed my accountType in authenticator.xml and forgot to change the AccountGeneral class. Both must be the same, otherwise you will not be bound to the AuthenticatorService for callbacks.

** authenticator.xml

 <?xml version="1.0" encoding="utf-8" ?><account-authenticator xmlns:android="http://schemas.android.com/apk/res/android" android:accountType="com.alfainfinity.fidodo" android:icon="@drawable/ic_navigate_before" android:smallIcon="@drawable/ic_navigate_before" android:label="@string/label" android:accountPreferences="@xml/prefs"/> 

** AccountGeneral.java

 package com.alfainfinity.fitdodo.Boundary.Handlers.AccountHandlers; public class AccountGeneral { /** * Account type id */ public static final String ACCOUNT_TYPE = "com.alfainfinity.fidodo"; /** * Account name */ public static final String ACCOUNT_NAME = "FitDodo"; /** * Auth token types */ public static final String AUTHTOKEN_TYPE_READ_ONLY = "Read only"; public static final String AUTHTOKEN_TYPE_READ_ONLY_LABEL = "Read only access to an FitDodo account"; public static final String AUTHTOKEN_TYPE_FULL_ACCESS = "Full access"; public static final String AUTHTOKEN_TYPE_FULL_ACCESS_LABEL = "Full access to an FitDodo account"; public static final ServerAuthenticate sServerAuthenticate = new ParseComServerAuthenticate(); 

}

Hope you find this helpful.

+18
source share

You will also get this error if you forget to add the <service> ...</service> block to your AndroidManifest.xml file.

  <service android:name=".auth.YourAuthenticationService"> <intent-filter> <action android:name="android.accounts.AccountAuthenticator" /> </intent-filter> <meta-data android:name="android.accounts.AccountAuthenticator" android:resource="@xml/authenticator" /> </service> 
0
source share

All Articles