After setting up the Sentry.io error tracking I get this error when I try to Generate Signed Apk:
Java Compiler
error: An organization slug is required (provide with --org)
Click on this image and open it to see more details:
I cannot understand anything from this one:
Process 'command
'/var/folders/j4/_fzm1rks3tsc2h3j4l2qbq4w0000gn/T/.sentry-cli1369818638611304938.exe'
' finished with non-zero exit value 1
This is the file address that was raised in error:
How can I solve this problem and Generate Signed Apk?
The docs are not a bit clear, though its mentioned but easy to miss it. There are two different sentry.properties required here.
You need to have another sentry.properties file in the project root with
and the runtime sentry.properties with DSN values, etc can be placed in app/src/main/resources directory(create resource directory if required)
Config Docs
When you enable Proguard minification, symbols are uploaded to Sentry. This upload is done via the
sentry-cli
, which is throwing the error. The error says the CLI doesn't know which project within Sentry to associate your symbols with. You need to make sure to go through the gradle integration in the docs. Specifically:Alternatively you can use
sentry-cli
directly to upload symbols, although the gradle integration is advised.instead of making
Just add these rules to proguard rules file and keep minifyEnabled true
That solved my issue without disabling minification
You need to upload the Proguard mapping file to the sentry server.
create a file in the root project folder and set name sentry.properties.
replace TEST, TEST_DEV, and TOKEN.
you can get TOKEN from https://sentry.io/api
if you are use custom sentry server, replace https://sentry.io to https://sentry.io to your server.
and change file build.gradle
and
I guess that setting
false
value tominifyEnabled
may solve the problem and actually it worked!app/build.gradle:
but it added 1.3MB to the size my of Apk file.
Please let me know if anyone has a different better solution.