所以在经历了很多麻烦和麻烦之后我终于在我的项目中配置了facebook sdk现在当我试图实现Log in class时它引发了以下异常。我试图用我的数字id替换我的ApplicationId而不是@ string / address ..但清单不接受这种格式..plz帮助
03-27 20:01:51.716: D/jdwp(15472): sendBufferedRequest : len=0x43
03-27 20:01:51.807: D/ActivityThread(15472): BIND_APPLICATION handled : 0 / AppBindData{appInfo=ApplicationInfo{417c3138 com.example.widgittest}}
03-27 20:01:51.966: D/AndroidRuntime(15472): Shutting down VM
03-27 20:01:51.967: W/dalvikvm(15472): threadid=1: thread exiting with uncaught exception (group=0x40eb9258)
03-27 20:01:51.978: E/AndroidRuntime(15472): FATAL EXCEPTION: main
03-27 20:01:51.978: E/AndroidRuntime(15472): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.widgittest/com.example.widgittest.testAct}: java.lang.NullPointerException: Argument 'applicationId' cannot be null
03-27 20:01:51.978: E/AndroidRuntime(15472): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2077)
03-27 20:01:51.978: E/AndroidRuntime(15472): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2104)
03-27 20:01:51.978: E/AndroidRuntime(15472): at android.app.ActivityThread.access$600(ActivityThread.java:134)
03-27 20:01:51.978: E/AndroidRuntime(15472): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1247)
03-27 20:01:51.978: E/AndroidRuntime(15472): at android.os.Handler.dispatchMessage(Handler.java:99)
03-27 20:01:51.978: E/AndroidRuntime(15472): at android.os.Looper.loop(Looper.java:154)
03-27 20:01:51.978: E/AndroidRuntime(15472): at android.app.ActivityThread.main(ActivityThread.java:4624)
03-27 20:01:51.978: E/AndroidRuntime(15472): at java.lang.reflect.Method.invokeNative(Native Method)
03-27 20:01:51.978: E/AndroidRuntime(15472): at java.lang.reflect.Method.invoke(Method.java:511)
答案 0 :(得分:1)
您如何定义applicationID?
这就是我在我的一个应用程序中定义我的方法:
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/app_id"/>
然后在strings.xml中
<string name="app_id">1234569xxxxxxxx</string>
这应该适合你。