Crashylitcs In android studio

Hello Guys,
I have installed and added Fabric plugin to my android studio and Have Implemented crashlytics to it.

When there is any crash regarding java file present in android studio it gets reported in fabric dashboard.
But when there is any crash in my CPP file which i have used xcode it doesnt get reported in crashlytics.

Is there any way where crashlytics can report the crashes which has occured in our cpp file,while the game is running on android device.

Thanks,

Yes, make sure you follow Crashlytics instructions to implement the NDK Crashlytics component. You might need to submit the ndk debug ‘symbols’ to crashlytics using a gradle command in their instructions before the NDK crashes start showing up in their dashboard.

@schngrg Did you test it with different flavors? I did not find any information regarding apps with flavors in Crashlytics. My game will be have different flavors and I would like to track every of this.

Yes, our app uses flavors and crashlytics works great. I don’t remember if this was documented in their official documents or somewhere else but it works just fine. One of the change is that the gradle command for uploading symbols must include the flavor name, and you will need to run this multiple times for every flavor. For example:

./gradlew crashlyticsUploadSymbols[FlavorName]Release

I don’t remember if anything else was needed to support flavors.

1 Like

@schngrg, I am now able to implement crashlyst for NDK support using the below link
https://fabric.io/downloads/gradle/ndk

And also added some line of code
In gradle,properties add android.useDeprecatedNdk=true;
In build.gradle(module:project name) add

ndk {
abiFilters “armeabi”, “armeabi-v7a”, “x86”, “mips”
}

Inside

defaultConfig {
}

 3.In build.gradle(module:project name)  add crashlytics {
						 enableNdk true
						androidNdkOut 'obj'
						 androidNdkLibsOut 'libs'

}

  4.In Application.mk file replace APP_ABI := armeabi with APP_ABI := armeabi-v7a

Hello Guys,
As i Said above, I am now able to see the crashes occuring in native code but i am not getting the respective line number with the crash report.
Can any one suggest wat changes may need to be done.

Thanks.

Did you run the symbol upload command after creating the APK? Check crashlytics documentation for details on this.

After you run the command, line no. will be visible only on new crashes. Not on old crashes already reported before you uploaded the symbols.

Yeah, but sometimes it wont help also :slight_smile:

Thanks for the reply guys, I had kept my build variant to debug and was using symbol FlavorName as release,but now when i changed FlavorName to build it works fine,
Thanks.