0

So after alot of trouble nd mess I finally configured facebook sdk in my project nd now when Im trying to implement Log in class it throws the following exception.I've tried to replace my ApplicationId with my numerical id instead of @string/address.. but the manifest doesnt accept this format..plz help

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)
4

1 回答 1

1

你是如何定义你的 applicationID 的?

这就是我在我的一个应用程序中定义我的方式:

<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/app_id"/>

然后在strings.xml

<string name="app_id">1234569xxxxxxxx</string>

现在应该对你有用。

于 2014-03-27T15:48:46.267 回答