Nauman Aslam
Nauman Aslam

Reputation: 299

Facebook sdk Android Null pointer exception

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)

Upvotes: 0

Views: 549

Answers (1)

Marcos Placona
Marcos Placona

Reputation: 21720

How are you defining your applicationID?

This is how I define mine on one of my applications:

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

And then in strings.xml

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

That should work for you now.

Upvotes: 1

Related Questions