Reputation: 543
I am getting crash on app launch in android with below error.
Native Client is not available, can't start on native.
Sentry.init({
enableNative: true,
enableNativeCrashHandling: true,
dsn:
'https://xyx.com/sentry/12',
})
When I set enableNative: false, then the crash stops coming but the android related crashes are not logged in sentry.
I have added sentry in build.gradle as well as per the sentry integration doc.
Any solution for this?
Upvotes: 4
Views: 3683
Reputation: 71
I had this problem as well, using the test of Sentry.nativeCrash() - the application would crash, but not be reported.
To fix, set autoInitializeNativeSdk to false and initialize in the AndroidManifest.
Sentry.init({
autoInitializeNativeSdk: false,
dsn:
'https://xyx.com/sentry/12',
})
Initialize the AndroidSDK in your AndroidManifest.xml
<application>
<meta-data android:name="io.sentry.auto-init" tools:replace="android:value" android:value="true" />
<meta-data android:name="io.sentry.dsn" android:value="https://[email protected]/0" />
</application>
Make sure you add xmlns:tools="http://schemas.android.com/tools"
to your manifest.
Follow the below link for documentation. Native Initialize
Upvotes: 4