Integrate Sentry in Chromium android browser

Hi,

I’m working on a android project that extends the Chromium browser for android.
I would like to integrate my project with Sentry, for crash reporting.

In documentation I’ve found that I should include this in my gradle file:

implementation ‘io.sentry:sentry-android:{version}’

But the problem is that Chromium doesn’t have a gradle build system, and I have to add the SDK manually.

I’ve tried to include this file, but has many dependinces:
https://dl.bintray.com/getsentry/sentry-android/io/sentry/sentry-android/2.0.0/:sentry-android-2.0.0.aar .

Is there any documentation for this? Or can I find some were a single sentry jar file that I can include in my project?

Thank you!

hey @radupa1 thanks for your message.

unfortunately, you’d need to do this manually, do you use any sort of build system? how do you do it?

Projects that don’t have a build system are very rare, because of that we’ve chosen to no support by default, but as I said, if you copy all the artifacts manually, you could do it, you still would need to do some stuff that only the AGP plugin does, like Manifest merging, etc, etc…

Good luck,
Manoel.

Hi,

Thanks for responding me. Yes, I’ve added manually all the libraries, and dependencies and the project builds, and the crashes are sent to the Sentry dashboard.

But I have now another problem. When I try to build for release I have an error relate to proguard. Are there any proguard rules that I have to add manually in order to build for release?

Thanks!
Radu

hey @radupa1 glad that you made it to work, it’s important to copy all transitive dependencies too, but if its sending already, you have done it right.

yes, this is part of the AGP tasks, but you can also copy and set manually.

if you have native code (NDK) this one too

if you minify your App, you need to upload the mapping.txt to Sentry, but as you don`t use Gradle, you need to do this manually.

This is our Gradle plugin

manually you can do thru sentry-cli

Good luck.

Hi @marandaneto,

Thanks again for responding me.
Finally I was able to integrate sentry in my app.

The easiest way was to create a new android project with android studio, and integrate there sentry. Then I’ve copied the .aar files from gradle directory, to my non-gradle project.

Regards.

1 Like

you’re welcome, glad to help.