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

Invalid verification code format error using scribe OAuth in android
how to terminate any application on End Call pressed in android?
putExtra from List into SMS body
traversing through Hierarchy viewer
Image Gallery Issues
R.java file is not generated?
Android: How to extract some datas from the server webService response with ksoap2
Gridview: Loses OnItemClickHandler
How to code Android 4.0 style section
How can I link to a phone call link from within an embedded web page in Android?
Android - how to implement color detection using opencv?
Why can't my TabHost child activity find the parent TabHost ID?
Android: Drawing tiled bitmaps with bottom or some other alignments similar to css background-position
Android ListView Recycler freaking out, or do I fail?
How can I save colors in array.xml and get its back to Color[] array
combine two gesture raw files in android application

Categories

HOME
windows
uml
eslint
mysql-workbench
toolbox
battery
gradient
opendj
switch-statement
alsa
permissions
ado.net
google-cloud-datalab
recordrtc
ibeacon-android
openbugs
scsi
atlassian-stash
git-extensions
digital-signature
mapstruct
cfml
gmm
boost-icl
asp.net-core-webapi
squashfs
bulletphysics
amazon-quicksight
android-things
tizen-tv
boost-asio
dumpbin
google-knowledge-graph
imagenet
xv6
chronicle-map
congestion-control
placeholder
wc
flask-login
reportservice2010
netbeans6.8
tinymce-3
trojan
payara-micro
context-sensitive-grammar
compiler-design
headless
pybrain
objectscript
pocketsphinx-android
cvxpy
smartfoxserver
slackware
angular2-testing
preprocessor
gogs
omniauth-facebook
php-socket
lz77
libvlc
maybe
toran-proxy
dynatree
include-guards
rubaxa-sortable
mod-proxy
jdk1.7
jsvc
android-vibration
punycode
teaspoon
imagefilter
human-computer-interface
strawberry-perl
jqmodal
jjaql
mutual-authentication
vbe
xmltodict
spring-3
bin
light
isqlquery
route-provider
abstract-data-type
dolby-audio-api
pclzip
android-icons
cardreader
sentestingkit
fusefabric
apache-whirr
oracle-enterprise-linux
flex-mobile
user-tracking
winmain
uipagecontrol
http-daemon
objective-j
updatesourcetrigger
addchild
skype4java
feasibility
fault-tolerance
contentpresenter

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