Android logging fails for Release but works for Debug

Hi!

I’ve started to use Sentry for an Android project I’m working on, but now got a little stuck. The logging (info/error/fatal) works good for the Debug build variant of the app, but nothing seems to get logged for the Release build.

I’ve tried to make the builds (debug/release) as similar as possible, e.g. setting minify-enabled=false and debuggable=true for Release.

My company is using a self hosted Sentry, version 8.20.0.
In the Android project we have sentry-android:1.6.2, and sentry-android-gradle-plugin:1.6.3.
Test device has been the Android Emulator, with Nexus6-Oreo(8.0.0) and Nexus5X-Nougat(7.1.1)

Do you have advice about what to try or check?

Sentry logging says:

io.sentry.android.AndroidSentryClientFactory: Construction of Android Sentry.
io.sentry.android.AndroidSentryClientFactory: Sentry init with ctx='android.app.Application@6349ce' and dsn='Dsn{uri=https://yyyyyyy.com/}'
io.sentry.android.AndroidSentryClientFactory: Using buffer dir: /data/user/0/yyyyyyy/cache/sentry-buffered-events
1 Like

OK,
happy to announce some progress!

First thing that made Sentry-logs start working for my Release-builds:
Removing the gradle parts I added following the Sentry Proguard-settings guide:

classpath 'io.sentry:sentry-android-gradle-plugin:1.6.3'

and:

apply plugin: 'io.sentry.android.gradle'
sentry {
    autoProguardConfig true
    autoUpload true
}

Afterwards logging started to work.

Then I added the parts above again, and it still worked… It continued working until I set debuggable=false under buildTypes.release… Thereafter it wouldn’t log even with debuggable=true, until I
a) repeated the remove- and readd part described in the beginning, or
b) cleaned the project (Build->Clean Project).

New question:
Is it expected behaviour that app-crashes don’t get reported to Sentry when gradle setting is debuggable=false?