83256

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
Answer1:
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.