From my C code in the Android NDK app, I'm trying to initialize Crashlytics but it's returning NULL.
LOGW ("Initializing Crashlytics");
crashlyticsContext = crashlytics_init();
LOGI ("crashlyticsContext: %lx", (uint32_t) crashlyticsContext);
In the logcat log, I'm getting a Permission Denial log:
W/SimTalk: Initializing Crashlytics
W/ActivityManager: Permission Denial: getCurrentUser() from pid=18043, uid=10079 requires android.permission.INTERACT_ACROSS_USERS
I/SimTalk: crashlyticsContext: 0
My build.gradle file includes the compile line for the NDK:
compile('com.crashlytics.sdk.android:crashlytics-ndk:2.0.2@aar') {
transitive = true
}
and the crashlytics section
crashlytics {
enableNdk true
}
and my AndroidManifest.xml file does contain my metadata:
<meta-data
android:name="io.fabric.ApiKey"
android:value="............omitted.............." />
Do you have any idea why my crashlytics_init() isn't working?
Update: I've determined that the dlopen() call in crashlytics_init() is returning NULL. The libcrashlytics.so file is included in the APK along with the other libs. It's still not loading, though.