该项目一直运行良好,直到两天前突然发生错误。我不知道如何解决它,因为我已经做了我能做的一切,包括重新安装 android studio 和 gradle。
无法解析配置 ':app:debugCompileClasspath' 的所有文件。找不到与 com.google.android.gms:strict-version->matcher-plugin:[15.0.0, 16.0.0) 匹配的任何版本。不匹配的版本:1.1.0 1.0.3 1.0.2 1.0.1 1.0.0 需要:项目 :app > com.google.gms:google-services:4.2.0
build.gradle(应用程序)
apply plugin: 'com.android.application'
buildscript {
repositories {
mavenCentral()
maven {
url "https://maven.google.com"
}
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:4.1.0'
}
}
// Allow plugins to declare Maven dependencies via build-extras.gradle.
allprojects {
repositories {
mavenCentral();
jcenter()
}
}
task wrapper(type: Wrapper) {
gradleVersion = '4.1.0'
}
// Configuration properties. Set these via environment variables, build-extras.gradle, or gradle.properties.
// …Run Code Online (Sandbox Code Playgroud) 为什么Another exception was thrown: FormatException: Invalid number (at character 1)在一切恢复正常之前,我的屏幕上会出现错误几微秒。有时它甚至不会发生。下面是我的 StreamBuilder 函数:
_delivered() {
print('In the delivered function:${resId},${customerId}, ');
return StreamBuilder<QuerySnapshot>(
stream: Firestore.instance
.collection('restaurants')
.document(resId)
.collection('customers')
.document(customer)
.collection('orders')
.where('deliveryTime', isGreaterThan: '')
.snapshots(),
builder: (context, snapshot) {
print('Does snapshop have data? ${snapshot.hasData}');
if (!snapshot.hasData) return Container();
List deliveredListFromServer = snapshot.data.documents;
return Expanded(
child: ListView(
shrinkWrap: true,
children: deliveredListFromServer.map((item) {
print('document id: ${item.documentID}');
return InkWell(
child: SizedBox(
height: 50,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
SizedBox(
width: 80,
child: Text( …Run Code Online (Sandbox Code Playgroud)