bugsnag / bugsnag-android-gradle-plugin

Gradle plugin for BugSnag which uploads ProGuard, DexGuard and NDK mapping files, and sends build notifications
https://docs.bugsnag.com/build-integrations/gradle/
MIT License
70 stars 38 forks source link

Mapping file not found #85

Closed antonsivogrivov closed 6 years ago

antonsivogrivov commented 6 years ago

Expected behavior

Mapping file upload success

Observed behavior

Mapping file not found: null message during my project building

Steps to reproduce

I have just install bugsnag-android-gradle-plugin with basic configuration from this guide and try to build apk with $ ./gradlew assembleProdRelease

Version

com.bugsnag:bugsnag-android-gradle-plugin:3.2.4

Additional information

Use it with react native 0.52

fractalwrench commented 6 years ago

Thanks for the report @tonygriv. Would you be able to find out which version of the Android Build Tools/Gradle Plugin your React Native project is using, by finding the build.gradle file in the root of your android directory? Version 3.+ of the Bugsnag plugin will only work with AGP 3.+, so it would be good to confirm that that's not an issue here.

antonsivogrivov commented 6 years ago

com.android.tools.build:gradle: 3.0.1 com.bugsnag:bugsnag-android-gradle-plugin: 3.2.4

antonsivogrivov commented 6 years ago

Versions is ok?

fractalwrench commented 6 years ago

@tonygriv the versions look ok. Is there any more useful information above the Mapping file not found error message? I'll see if I can test out the plugin with a React Native project using those versions today.

antonsivogrivov commented 6 years ago

I see only this

screen shot 2018-01-26 at 14 56 55

fractalwrench commented 6 years ago

@tonygriv I was able to reproduce this behaviour when ProGuard obfuscation was disabled. Could you check that -dontobfuscate isn't in proguard-rules.pro within your Android module? You may also want to check that ProGuard is enabled within your build.gradle file:

buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.pro'
        }
}

If you don't use ProGuard to obfuscate your Android code, then there's no need to upload mapping files to Bugsnag - everything should work automatically.