hi all

    My app use account manager to share auth token and it works fine in 
early 4.0.
    But when i try the app in my Nexus S (4.0.3) , NPE occurs every time i 
call the getAuthToken method.

    Stack trace as follows:

E/AndroidRuntime( 5282): java.lang.RuntimeException: Unable to start 
activity ComponentInfo{android/android.accounts.Gra
ntCredentialsPermissionActivity}: java.lang.NullPointerException
E/AndroidRuntime( 5282):        at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
E/AndroidRuntime( 5282):        at 
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
E/AndroidRuntime( 5282):        at 
android.app.ActivityThread.access$600(ActivityThread.java:123)
E/AndroidRuntime( 5282):        at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
E/AndroidRuntime( 5282):        at 
android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 5282):        at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 5282):        at 
android.app.ActivityThread.main(ActivityThread.java:4424)
E/AndroidRuntime( 5282):        at 
java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 5282):        at 
java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 5282):        at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
E/AndroidRuntime( 5282):        at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
E/AndroidRuntime( 5282):        at dalvik.system.NativeStart.main(Native 
Method)
E/AndroidRuntime( 5282): Caused by: java.lang.NullPointerException
E/AndroidRuntime( 5282):        at 
android.accounts.GrantCredentialsPermissionActivity.onCreate(GrantCredentialsPermissi
onActivity.java:84)
E/AndroidRuntime( 5282):        at 
android.app.Activity.performCreate(Activity.java:4465)
E/AndroidRuntime( 5282):        at 
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
E/AndroidRuntime( 5282):        at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
E/AndroidRuntime( 5282):        ... 11 more
W/ActivityManager(  151):   Force finishing activity 
android/.accounts.GrantCredentialsPermissionActivity


     But, when i get google's AuthToken, it works fine.
     My question is :
          Are there something wrong in my code and how can i fix it?
          Or it is a bug in android and it will be fixed later?

thx

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to