1

I am using Sentry 2.0.0 in my Android app. The Sentry SDK works, but when obfuscating my app, the Sentry plugin is not uploading the Proguard mappings to their server (I can see crashes in the Sentry webapp, but the stacktrace shows obfuscated class names). When I run the assembleRelease task in gradle I don’t see anything related to Sentry in the log console.

I believe I have configured everything like instructed in the docs (https://docs.sentry.io/clients/java/integrations/).

This is exactly what I have:

./build.gradle

dependencies {
    [...]
    classpath 'io.sentry:sentry-android-gradle-plugin:1.7.30'
}

.app/build.gradle

apply plugin: "io.sentry.android.gradle"
[..]

sentry {
    autoProguardConfig true
    autoUpload true
}

android {
    compileSdkVersion 29
    defaultConfig {
        minSdkVersion 26
        targetSdkVersion 29
         [..]        
    }

    buildTypes {

        buildTypes.all {
           [..]
           proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }

        [..]

        release { 
            [..]
            minifyEnabled true
            shrinkResources true
        }
    }

    [..]

dependencies {
    implementation 'io.sentry:sentry-android:2.0.0'
    implementation 'org.slf4j:slf4j-nop:1.7.25'
    [..]
}

./sentry.properties

defaults.project=android
defaults.org=...
auth.token=....

Gradle version: Gradle 5.6.4

Thank you

GaRRaPeTa
  • 5,459
  • 4
  • 37
  • 61

1 Answers1

0

thanks for raising this issue.

sentry {
    autoProguardConfig true
    autoUpload true
}

this block is not even needed, they are enabled by default. could you try the latest version? it's 1.7.34

btw org.slf4j:slf4j-nop is not needed if only for Sentry since the major BUMP 2.0

If it still doesn't work, please raise an issue using the issue template, this would help us with the information needed like AGP version etc... thanks.

Manoel Neto
  • 158
  • 4