AuthenticatorException: crash on crash on AVD

I am trying to create an Android application that uses the Google OAuth library, like this sample .

However, when I call getAuthTokenByFeatures, I get an exception that throws this on LogCat:

05-24 10:56:58.224: W/System.err(557): android.accounts.AuthenticatorException: bind failure 05-24 10:56:58.236: W/System.err(557): at android.accounts.AccountManager.convertErrorToException(AccountManager.java:1563) 05-24 10:56:58.236: W/System.err(557): at android.accounts.AccountManager.access$400(AccountManager.java:140) 05-24 10:56:58.236: W/System.err(557): at android.accounts.AccountManager$AmsTask$Response.onError(AccountManager.java:1409) 05-24 10:56:58.236: W/System.err(557): at android.accounts.IAccountManagerResponse$Stub.onTransact(IAccountManagerResponse.java:69) 05-24 10:56:58.236: W/System.err(557): at android.os.Binder.execTransact(Binder.java:338) 05-24 10:56:58.236: W/System.err(557): at dalvik.system.NativeStart.run(Native Method) 

However, this does not happen with a real Android device. I imitate Android 4.0.3 and could not find an answer to this anywhere for life. Any ideas?

+4
java android mobile avd
source share
1 answer

This is usually observed when you do not declare an authenticator in the manifest. See Creating a stub authenticator .

 <service android:name="com.example.android.syncadapter.AuthenticatorService"> <intent-filter> <action android:name="android.accounts.AccountAuthenticator"/> </intent-filter> <meta-data android:name="android.accounts.AccountAuthenticator" android:resource="@xml/authenticator" /> </service> 
+5
source share

All Articles