[Flutter]Firebase Remote Configで No virtual method isDeveloperModeEnabled()Z in classエラーが発生する
こんばんは。今日もお疲れ様です。
FlutterでFirebase Remote Configを使用したプログラムをビルドしたときに、
E/flutter (18539): [ERROR:flutter/shell/platform/android/platform_view_android_jni_impl.cc(43)] java.lang.NoSuchMethodError: No virtual method isDeveloperModeEnabled()Z in class Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigSettings; or its super classes (declaration of 'com.google.firebase.remoteconfig.FirebaseRemoteConfigSettings' appears in /data/app/my.app-ItOxdJo5ljyanMFjofxlDg==/base.apk)
というビルドエラーが出て、頭を抱えていました。
Githubにもissueとして取り上げられておりましたので解決方法をここに記しておきたいと思います。なお、2020年2月15日現在修正されていないバグのようです。
https://github.com/FirebaseExtended/flutterfire/issues/4035
回避方法
app/src/build.gradleに
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.google.firebase:firebase-analytics'
implementation platform('com.google.firebase:firebase-bom:26.4.0')
}
と記載されていたら、上記の3行目のimplementationを以下の通り書き換えてください。
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.google.firebase:firebase-analytics'
implementation platform('com.google.firebase:firebase-bom')
}
これで解決します!
この記事が気に入ったらサポートをしてみませんか?