Error : Facebook SDK AndroidRuntime﹕FATAL EXCEPTION: main


Logs:
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(LoginManager.java:382)
            at com.facebook.login.LoginManager.logInWithReadPermissions(LoginManager.java:262)
            at com.facebook.login.widget.LoginButton$LoginClickListener.onClick(LoginButton.java:693)
            at com.facebook.FacebookButtonBase$1.onClick(FacebookButtonBase.java:310)
            at android.view.View.performClick(View.java:4646)
            at android.view.View$PerformClick.run(View.java:19403)
            at android.os.Handler.handleCallback(Handler.java:733)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:146)
            at android.app.ActivityThread.main(ActivityThread.java:5511)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
            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:configChanges=
                "keyboard|keyboardHidden|screenLayout|screenSize|orientation"
            android:theme="@android:style/Theme.Translucent.NoTitleBar"
            android:label="@string/app_name" />

Make sure that this tag exists in your Manifest.

Advertisements
Try Out Code2care Dev Tools:

Advertisements



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


Advertisements


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 - https://donate.unhcr.org/in/en-in/ukraine-emergency