添加firestore依赖项后构建失败,错误如下:这只发生在添加firestore依赖项后,当我删除它时,应用程序构建得很好。
失败:生成失败,出现异常。
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.google.gms:google-services:4.3.3'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 28
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
applicationId "com.tola.www.tola"
minSdkVersion 21
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
implementation 'com.google.firebase:firebase-firestore:21.3.1'
}
apply plugin: 'com.google.gms.google-services'
梯度包装属性:
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
和我的颤振依赖:
version: 1.0.0+1
environment:
sdk: ">=2.1.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cloud_firestore: ^0.13.0+1
firebase_core: ^0.4.3+2
cupertino_icons: ^0.1.2
font_awesome_flutter: ^8.5.0
dev_dependencies:
flutter_test:
sdk: flutter
你可以尝试使用这个构建。Gradle它对我来说非常有效:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.google.gms:google-services:4.2.0'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
错误:失败:生成失败,出现异常。*错误:任务“:app:ProcessDebugResources”执行失败。
我被添加了谷歌云依赖项 但我的生成失败,出现以下错误 我尝试禁用批注处理器 我收到以下错误
我面临着以下问题。我有两个Gradle项目(ProjectA和ProjectB)在同一个层次结构上,没有任何根项目。由于ProjectA依赖于ProjectB,我尝试将其建模如下: ProjectA的settings.gradle: ProjectA的build.gradle: 然而,当我在ProjectA上执行gradle build时,我得到了以下错误: 我必须在ProjectB中定义某种默认
我正在努力在我的项目中添加外部依赖项,将 我尝试了@Sharj提出的解决方案。它很好地解决了Decoview图表的依赖性。不管怎样,我尝试添加这个新的依赖项 编译失败,出现以下错误:
你可以在同一个构建里加入项目之间的依赖, 举个例子, 一个项目的 JAR 文件被用来编译另外一个项目. 在 api 构建文件里我们将加入一个由 shared 项目产生的 JAR 文件的依赖. 由于这个依赖, Gradle 将确保 shared 项目总是在 api 之前被构建. Example 7.13. 多项目构建 - 项目之间的依赖 api/build.gradle dependencies {
如何将此WorldEdit依赖项添加到Maven项目中?http://maven.sk89q.com/artifactory/repo/com/sk89q/worldedit/worldedit-bukkit/我需要6.1.1快照。 是否有算法来获取组ID工件ID和版本?