gpt4 book ai didi

android - 错误 :(42, 13) 无法解析 : com. android.support :appcompat-v7:26. 0.1

转载 作者:行者123 更新时间:2023-11-29 15:38:16 25 4
gpt4 key购买 nike

我尝试更改 SDK 版本和所有内容,但运气不好,似乎错误想留下来。

当 app: Compact 是 25.0.1 时,它说要更改为更新的版本,我尝试更改它时出现新错误。

以及较新版本的应用程序:compact V7 26.0.1

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 26
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.example.jithendra.kotlinexample"
minSdkVersion 15
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'
}
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
}

buildscript {
ext.kotlin_version = '1.1.4'
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
}
}

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:26.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
compile "org.jetbrains.anko:anko-commons:0.10.0"
compile (//Anko dependencies
'org.jetbrains.anko:anko-sdk15:0.8.3', //sdk19,21,23 are also available
'org.jetbrains.anko:anko-appcompat-v7:0.8.3' //for appcompact-v7 bindings
)

}
repositories {
mavenCentral()
}

click on this link for error

最佳答案

此处Android studio 询问maven 库依赖项。只需打开您的项目级 gradle 并在其中添加以下内容:

allprojects{
repositories { }
}

部分(如果您没有如上所述创建一个):

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

关于android - 错误 :(42, 13) 无法解析 : com. android.support :appcompat-v7:26. 0.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45778794/

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