android


Facebook Login Button crashing app without error message


This issue suddenly popped up this morning after working great for weeks.
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
FacebookSdk.sdkInitialize(getApplicationContext());
setContentView(R.layout.activity_login);
callbackManager = CallbackManager.Factory.create();
LoginButton loginButton = (LoginButton) findViewById(R.id.authButton);
loginButton.registerCallback(callbackManager, new FacebookCallback<LoginResult>() {
#Override
public void onSuccess(LoginResult loginResult) {
Log.d("Facebook Login Status", "success!");
}
#Override
public void onCancel() {
Log.d("Facebook Login Status", "Canceled!");
}
#Override
public void onError(FacebookException exception) {
Log.d("Facebook Login Status", "Failed!");
}
});
}
Somewhere in there, the app crashes. None of the callback methods are run, and nothing is printed to logcat. I just see a loading spinner for a split second and then the app force closes with no message.
Edit:
I did find this log actually, but I don't know what it means.
04-24 15:44:56.787 1753-1753/com.android.systemui W/ResourceType: No package identifier when getting value for resource number 0x00000000
04-24 15:44:56.788 1753-1753/com.android.systemui W/PackageManager: Failure retrieving resources for com.devon_dickson.apps.oncampus: Resource ID #0x0
The same was happening to me, so I started from scratch with another Activity and slowly duplicated the new activity till it matched the one that was breaking. In short, it was nothing to do with the Activity but the Android Manifest.
In my Android Manifest, I had android:noHistory="true" on my LoginActivity which was crashing my app. Once I removed it then it worked again.

Related Links

Updated Android Studio, receiving DuplicateFileException
How to get position from string of .getSelectedItem()
RxAndroidBle crash on subscribe to multiple characteristics
Android text to text translation (french to english)
Android: Have PushNotifications an income-timestamp?
android :how to localise only with wifi or mobile network by code without using popup security menu
how to get delivery status of message in smack or in xmpp from android
Android - RecyclerView drag using ItemTouchHelper.Callback
Activity still being destroyed when keyboard is shown even though I've configured the activity to handle that configuration change
android realm predefined database performance
Scrollable CardView with RecyclerView inside
Unable to customize new layout resource file in Android Studio
How to use method of object in Android data binding?
Android: Can't inflate class fragment
Whats the purpose of “this” when create object in memory? - android
My app looks different scale when i change phone

Categories

HOME
windows
xml
assembly
localization
gdb
swt
toolbox
camera
hessian
yandex
dojo
hpc
jetty
tvos
google-admin-sdk
title
augeas
pcl-crypto
java.util.logging
resultset
rtf
internationalization
package.json
pyramid
foreign-keys
cfml
connector
angular-routing
pimcore
comparator
dynamically-generated
xcode-ui-testing
corpus
angularjs-components
linked-data
paperjs
dst
kudu
git-squash
jwplayer6
numpy-broadcasting
bc
spring-mvc-test
magento-1.9.3
stringtokenizer
branching-and-merging
dbnull
oracle-service-bus
http-request
strftime
x++
pom.xml
geotiff
rserve
identification
static-cast
yii2-user
bbpress
cubism.js
google-cloud-console
myspace
iotivity
drawstring
android-dateutils
firebase-security
respondcms
cfchart
angular-ui-typeahead
upx
nio2
contentcontrol
inf
decimalformat
fiware-monitoring
fuelcms
coda
sony-lifelog-api
eoferror
rdflib
mirror
osc
machine-instruction
codeplex
vbe
inputmismatchexception
jeromq
epiceditor
chart-director
wimax
uimanageddocument
garbage
kqueue
cgimage
diagrams
delimited-text
duplex
dojo-dnd
application-planning
soappy
lemmatization

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App