我正在 Android Studio 上开发一个新的 Flutter 应用程序。我的应用程序的一页从Future. 有了未来的结果,我正在创建一个ListView.builder():
这是代码:
Widget encabezados(BuildContext context, AsyncSnapshot snapshot)
{
ListView(
children: <Widget>[
new Card(
elevation: 3,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
SizedBox(width: 0.0,),
Category(
backgroundColor: Colors.deepOrange,
val: clientesacobrar.toString(),
title: "Clientes a cobrar",
),
SizedBox(width: 10.0,),
Category(
backgroundColor: Colors.blue,
title: "Clientes cobrados",
val: clientescobrados.toString(),
),
SizedBox(width: 10.0,),
Category(
val: formatter.format(montoacobrar),
//val: records.length.toString(),
backgroundColor: Colors.green,
title: "Monto a cobrar",
)
],
),
),
new ListView(
shrinkWrap: true,
scrollDirection: Axis.vertical,
//elevation: 3,
children: …Run Code Online (Sandbox Code Playgroud) 我最近升级了 Flutter 项目中的所有 firebase 库。之后,我收到消息:
/flutter (27126): [ERROR:flutter/shell/platform/android/platform_view_android_jni_impl.cc(43)] java.lang.NoSuchMethodError: Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigSettings 类中没有虚拟方法 isDeveloperModeEnabled()Z;或其超类('com.google.firebase.remoteconfig.FirebaseRemoteConfigSettings' 的声明出现在 /data/app/package_name-1UBO7FEPHLsC2_eb7itJLA==/base.apk!classes3.dex 中)
之后,我的应用程序因错误而崩溃:
[致命:flutter/shell/platform/android/platform_view_android_jni_impl.cc(942)] 检查失败:CheckException(env)。
目前我正在使用:
firebase_remote_config: ^0.4.0+2
firebase_core:0.5.0+1
我在 android/build.gradle 中的依赖项:
dependencies {
classpath 'com.android.tools.build:gradle:3.6.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.4'
classpath 'io.fabric.tools:gradle:1.28.1'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.3.0'
}
Run Code Online (Sandbox Code Playgroud)
android/app/build.gradle
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
testImplementation 'junit:junit:4.13.1'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.google.firebase:firebase-config:20.0.0'
implementation 'com.facebook.android:facebook-login:7.1.0'
implementation 'com.google.firebase:firebase-messaging:21.0.0'
implementation 'com.google.android.gms:play-services-basement:17.5.0'
configurations.all {
resolutionStrategy.force 'com.google.android.gms:play-services-base:17.1.0'
}
}
Run Code Online (Sandbox Code Playgroud)