将facebook按钮插入登录活动时,我一直收到错误消息。我的登录活动是一个空白活动,它的相应文件只包含按钮;
<com.facebook.widget.LoginButton
android:id="@+id/authButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="128dp" />
我的logcat读取;
07-31 06:34:26.773: E/AndroidRuntime(2006): FATAL EXCEPTION: AsyncTask #1
07-31 06:34:26.773: E/AndroidRuntime(2006): Process: com.example.mafta, PID: 2006
07-31 06:34:26.773: E/AndroidRuntime(2006): java.lang.RuntimeException: An error occured while executing doInBackground() 07-31 06:34:26.773: E/AndroidRuntime(2006):at android.os.AsyncTask$3.done(AsyncTask.java:300) 07-31 06:34:26.773: E/AndroidRuntime(2006): at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355) 07-31 06:34:26.773: E/AndroidRuntime(2006): at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
07-31 06:34:26.773:E / AndroidRuntime(2006):at java.util.concurrent.FutureTask.run(FutureTask.java:242)07-31 06:34:26.773:E / AndroidRuntime(2006) ):在android.os.AsyncTask $ SerialExecutor $ 1.run(AsyncTask.java:231)07-31 06:34:26.773:E / AndroidRuntime(2006):at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java) :1112)07-31 06:34:26.773:E / AndroidRuntime(2006):at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:587)07-31 06:34:26.773:E / AndroidRuntime (2006):at java.lang.Thread.run(Thread.java:841)07-31 06:34:26.773:E / AndroidRuntime(2006):引起:java.lang.NullPointerException 07-31 06:34: 26.773:E / AndroidRuntime(2006):at java.util.concurrent.ConcurrentHashMap.containsKey(ConcurrentHashMap.java:911)07-31 06:34:26.773:E / AndroidRuntime(2006):at com.facebook.internal.Utility .queryAppSettings(Utility.java:391) 07-31 06:34:26.773:E / AndroidRuntime(2006):at com.facebook.widget.LoginButton $ 1.doInBackground(LoginButton.java:676)07-31 06:34:26.773:E / AndroidRuntime(2006):在com.facebook.widget.LoginButton $ 1.doInBackground(LoginButton.java:1) 07-31 06:34:26.773:E / AndroidRuntime(2006):在android.os.AsyncTask $ 2.call(AsyncTask.java:288) 07-31 06:34:26.773:E / AndroidRuntime(2006):at java.util.concurrent.FutureTask.run(FutureTask.java:237) 07-31 06:34:26.773:E / AndroidRuntime(2006):... 4更多
问题是什么? 感谢