gpt4 book ai didi

java - 找不到参数的方法 compile() [com.android.support :cardview-v7:27. 0.2]

转载 作者:行者123 更新时间:2023-11-30 00:10:10 27 4
gpt4 key购买 nike

我尝试合并两个项目。我的 SDK 已更新,但每次我运行代码时都会收到此错误。

Error:(19, 0) Could not find method compile() for arguments 
[com.android.support:cardview-v7:27.0.2] on object of type
org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Please install the Android Support Repository from the Android SDK Manager.

我的所有支持存储库都已下载。一直在寻找这个解决方案太久了,但没有成功。这是我的 android/app/build.gradle 文件的代码。

apply plugin: 'com.android.application'

android {
compileSdkVersion 27
defaultConfig {
applicationId "pingo.betnek.hospiva"
minSdkVersion 17
targetSdkVersion 27
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()
}

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

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',
{
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:27.0.2'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:27.0.2'
// compile 'cn.pedant.sweetalert:library:1.3'
compile 'com.github.f0ris.sweetalert:library:1.5.1'
compile 'com.android.support:cardview-v7:27.0.2'
compile 'com.google.firebase:firebase-database:11.8.0'
compile 'com.google.firebase:firebase-storage:11.8.0'
compile 'com.google.firebase:firebase-auth:11.8.0'
compile 'com.android.support:recyclerview-v7:27.0.2'
testCompile 'junit:junit:4.12'

// For Alert Notifications from top
compile 'com.tapadoo.android:alerter:2.0.1'
}



apply plugin: 'com.google.gms.google-services'

请帮助我解决这个问题。

最佳答案

我遇到了同样的问题,只是把它改成了

编译“com.android.support:appcompat-v7:27.0.0”

关于java - 找不到参数的方法 compile() [com.android.support :cardview-v7:27. 0.2],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48287724/

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