I am integrating Bugsnag into a React Native project. I want to ensure that any stack trace correctly references the right area of the code because due to needing to use a release app to get a stack trace, the source mappings are minified and therefore the method names and line numbers will not match my codebase. I have been following this page to set it up but when following the step to add the line: apply plugin: 'com.bugsnag.android.gradle'
as the last line of app\android\build.gradle
I get the following error when synching with Android Studio:
Error: Could not find method getPackageApplication() for arguments [] on object of type com.android.build.gradle.internal.api.ApplicationVariantImpl.
Until that point I was able to successfully integrate Bugsnag into my React Native project and link it to my Bugsnag account to see stack traces when my app crashes.