gpt4 book ai didi

android - 找不到方法 maven()

转载 作者:太空狗 更新时间:2023-10-29 15:40:04 24 4
gpt4 key购买 nike

我收到以下错误:

在 org.gradle.api.Project 类型的根项目“约会”上找不到参数 [build_3sdtqstdmsgdnexrxaaxgljji$_run_closure1$_closure4@325a800c] 的方法 maven()。

这是我的项目级 Gradle 文件:

buildscript {

repositories {
google()
jcenter()
maven { url "http://jcenter.bintray.com"}
maven { url "https://maven.fabric.io/public" }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.google.gms:google-services:4.0.0'
classpath 'io.fabric.tools:gradle:1.25.4'


// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
google()
jcenter()
}
maven {
url 'https://maven.google.com/'
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

这是我的应用级 Gradle 文件:

apply plugin: 'com.android.application'

android {
compileSdkVersion 26
defaultConfig {
applicationId "com.gtaandteam.android.wellcure"
minSdkVersion 19
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

repositories {
mavenCentral()
maven {
url "https://s3-ap-southeast-1.amazonaws.com/godel-release/godel/"
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'ai.devsupport.instamojo:instamojolib:0.1.6'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.firebase:firebase-crash:11.0.4'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation "com.android.support:design:24.2.0"
implementation 'com.google.firebase:firebase-core:16.0.0'
implementation 'com.google.firebase:firebase-auth:16.0.1'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.3'


}
apply plugin: 'com.google.gms.google-services'
apply plugin: 'io.fabric'

我已经尝试了其他帖子和解决方案网站中提到的所有技术,但我没有在这些网站中找到任何列出的相同错误。因此,我在这里提出这个问题。

最佳答案

您收到此错误是因为您的 Maven 不应是“allprojects”的直接子项,而应是“repositories”的直接子项。

allprojects {
repositories {
google()
jcenter()

maven {
url 'https://maven.google.com/'
}
}
}

关于android - 找不到方法 maven(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51493871/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com