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)
Hariharan
  • 24,741
  • 6
  • 50
  • 54
Nauman Aslam
  • 299
  • 3
  • 14

1 Answers1

1

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.

Marcos Placona
  • 21,468
  • 11
  • 68
  • 93
  • I saved the same way but I wasnt referring it properly.It worked now.Thanks alot.. – Nauman Aslam Mar 27 '14 at 16:21
  • @NaumanAslam what do you mean you were not referring it properly? – Sagar Balyan Sep 07 '17 at 10:25
  • @SagarBalyan I'm sorry but its been over 3 years and don't actually remember what it was. But I was very much new to programming back then so it must have been something to do with my android:value="@string/app_id" part. – Nauman Aslam Sep 07 '17 at 13:12