Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable uploading mapping file of Firebase Crashlytics for alpha and beta version?

I want to disable the uploading mapping file to the Firebase server for alpha and beta build.

My grade buildTypes:

buildTypes {
    release {
        minifyEnabled true
        debuggable false
        useProguard false
        zipAlignEnabled true
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'

    }
    beta {
        minifyEnabled true
        debuggable true
        zipAlignEnabled true
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'

        firebaseCrashlytics {
            mappingFileUploadEnabled false
        }
    }
    alpha {
        minifyEnabled true
        debuggable true
        zipAlignEnabled true
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'

        firebaseCrashlytics {
            mappingFileUploadEnabled false
        }
    }
}

But after adding this code:

firebaseCrashlytics {
    mappingFileUploadEnabled false
}

I have this error and I don't know how to fix it:

No signature of method: build_1dvhq7u1hv066n9hrxkm7yggx.android() is applicable for argument types: (build_1dvhq7u1hv066n9hrxkm7yggx$_run_closure1) values: [build_1dvhq7u1hv066n9hrxkm7yggx$_run_closure1@48779342]
like image 527
MDev25 Avatar asked Sep 18 '20 07:09

MDev25


People also ask

How do I turn off firebase Crashlytics?

To opt out of automatic crash reporting, pass false as the override value. When set to false, the new value does not apply until the next run of the app. To disable the crash logs while in debug mode you must pass !

How do I enable debug logging in Crashlytics?

Enable debug logging for Crashlytics Enable debug logging: In Xcode, select Product > Scheme > Edit scheme. Select Run from the left menu, then select the Arguments tab. In the Arguments Passed on Launch section, add -FIRDebugEnabled .

What is firebase settings Crashlytics?

Firebase Crashlytics is a lightweight, realtime crash reporter that helps you track, prioritize, and fix stability issues that erode your app quality. Crashlytics saves you troubleshooting time by intelligently grouping crashes and highlighting the circumstances that lead up to them.


1 Answers

I had the same problem. error code:

debug{
  firebaseCrashlytics {
    mappingFileUploadEnabled = false
  }
}
apply plugin: 'com.google.firebase.crashlytics'

right code:

apply plugin: 'com.google.firebase.crashlytics'
android{
      debug{
        firebaseCrashlytics {
          mappingFileUploadEnabled = false
        }
     }
}

The reason is that the declaration of the plugin is placed after the use of the,I I hope this helps.

like image 87
diceyou Avatar answered Oct 16 '22 12:10

diceyou