gpt4 book ai didi

android - 找不到 com.android.tools.build :gradle:3. 2

转载 作者:行者123 更新时间:2023-11-29 19:12:18 25 4
gpt4 key购买 nike

在我安装 Android Studio 2.3 并更新我的 SDK 之后 the following error发生。可以做些什么来解决这个问题?

最佳答案

在 build.gradle.project 中使用它

//顶级构建文件,您可以在其中添加所有子项目/模块通用的配置选项。

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.1'

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

allprojects {
repositories {
jcenter()
}
}

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

这在 build.gradle.module 中

apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.example.madridistansit.mapapplication"
minSdkVersion 18
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

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:25.3.1'
}

关于android - 找不到 com.android.tools.build :gradle:3. 2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44888350/

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