如何解决如何禁用Alpha和Beta版本的Firebase Crashlytics的上传映射文件?
我想禁用将映射文件上传到Firebase服务器以进行alpha和beta构建。
我的成绩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
}
}
}
但是添加此代码后:
firebaseCrashlytics {
mappingFileUploadEnabled false
}
我有此错误,我不知道如何解决:
No signature of method: build_1dvhq7u1hv066n9hrxkm7yggx.android() is applicable for argument types: (build_1dvhq7u1hv066n9hrxkm7yggx$_run_closure1) values: [build_1dvhq7u1hv066n9hrxkm7yggx$_run_closure1@48779342]
解决方法
我有同样的问题。错误代码:
debug{
firebaseCrashlytics {
mappingFileUploadEnabled = false
}
}
apply plugin: 'com.google.firebase.crashlytics'
正确的代码:
apply plugin: 'com.google.firebase.crashlytics'
android{
debug{
firebaseCrashlytics {
mappingFileUploadEnabled = false
}
}
}
原因是插件的声明放置在使用后,希望对您有所帮助。