Error : Facebook SDK AndroidRuntime﹕FATAL EXCEPTION: main

Posted on : Thu, 7th May 15 07:59 am UTC
100+ votes
Logs LogCat
05-07 12:52:36.018  23128-23128/org.code2care.fbloginwithandroidsdk E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: org.code2care.fbloginwithandroidsdk, PID: 23128
    Log in attempt failed: LoginActivity could not be started
            at com.facebook.login.LoginManager.startLogin(
            at com.facebook.login.LoginManager.logInWithReadPermissions(
            at com.facebook.login.widget.LoginButton$LoginClickListener.onClick(
            at com.facebook.FacebookButtonBase$1.onClick(
            at android.view.View.performClick(
            at android.view.View$
            at android.os.Handler.handleCallback(
            at android.os.Handler.dispatchMessage(
            at android.os.Looper.loop(
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(
            at dalvik.system.NativeStart.main(Native Method)

One of the reason of this issue can be the declaration of Facebook Activity in AndroidManifest.xml file is being missed.

snippet Language : xml
 <activity android:name="com.facebook.FacebookActivity"
            android:label="@string/app_name" />

Make sure that this tag exists in your Manifest.

Code2care's mission is to share varied knowledge in technical and non-technical areas gathered during day-to-day learnings and development activities so that our visitors can leverage this portal to find solutions to their queries without re-inventing the wheel. Technical posts include Learnings, Tutorials, Video Tutorials, Code Snippets, Tips-n-tricks.

Follow us : Facebook - Twitter - Google +