Error : Facebook SDK AndroidRuntime﹕FATAL EXCEPTION: main

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 reasons for this issue can be the declaration of Facebook Activity in AndroidManifest.xml file is being missed.

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

Make sure that this tag exists in your Manifest.

Try Out Code2care Dev Tools:


Android Java Linux Microsoft Google Python macOS Notepad++ Microsoft Teams CSS PHP SharePoint Html Linux C Programs Bootstrap jQuery Sublime Android Studio Facebook Eclipse WhatsApp News MySQL Json HowTos JavaScript FTP S3


Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and Software Developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include Learnings, Tutorials, Trouble-Shooting steps, Video Tutorials, Code Snippets, How Tos, Blogs, Articles, etc.
🎉 We are celebrating the 10th years of Code2care! Thank you for all your support! We hope we made a difference.
We strong support Gender Equality & Diversity.

We stand in solidarity with Ukraine - Make a donation to UNHCR -