I'm in the process of incorporating Bugsnag into my React Native project. I want to make sure that any stack traces point to the correct section of the code. However, due to the need for a release app to obtain a stack trace, the source mappings are minified, resulting in method names and line numbers that don't align with my codebase. I've been following the instructions on this page to set it up. But when I try to add the line:
apply plugin: 'com.bugsnag.android.gradle'
as the last line of app\android\build.gradle
, I encounter the following error when synchronizing with Android Studio:
Error: Could not find method getPackageApplication() for arguments [] on object of type com.android.build.gradle.internal.api.ApplicationVariantImpl.
Before running into this issue, I had successfully integrated Bugsnag into my React Native project and linked it to my Bugsnag account to view stack traces when my app crashes.