I integrated the FB SDK in my Android app via Gradle for log-in and tracking events. Log-in works fine, but the logcat keeps showing me an exception every 15 seconds once I try to log an app event:
D/com.facebook.appevents.AppEventsLogger: Got unexpected exception: java.lang.ClassNotFoundException: com.facebook.a.b
It gets thrown in PersistedEvents' readAndClearStore() method
Here's my code for logging the event:
AppEventsLogger logger = AppEventsLogger.newLogger(this);
Bundle parameters = new Bundle();
parameters.putString(AppEventsConstants.EVENT_PARAM_CURRENCY, "EUR");
parameters.putString(AppEventsConstants.EVENT_PARAM_CONTENT_TYPE, "product");
parameters.putString(AppEventsConstants.EVENT_PARAM_CONTENT_ID, id);
logger.logEvent(AppEventsConstants.EVENT_NAME_VIEWED_CONTENT,
1.99,
parameters);
I mean com.facebook.a.b
looks like a proguard issue to me. But in the FB SDK docs they clearly state that you do not need to enter any proguard rules for it to work. This error also shows when I don't minify my app and also if I download the sdk from github and include it as a module.
-keep class com.facebook.** { *; }
– Martini