gpt4 book ai didi

android-studio - 构建工具版本android失败

转载 作者:行者123 更新时间:2023-12-03 16:52:02 26 4
gpt4 key购买 nike

我试图在一个新安装的 android studio(今天)中打开我的一个旧项目,它给了我这个错误:

failed to find build tools revision 23.0.0 rc2
install build tools 23.0.0 rc2 and sync project

我在互联网上寻找它,并尝试将其添加到 gradle 文件中:
android {
compileSdkVersion 22
buildToolsVersion "22.0.0"
}

它给了我另一个错误:
gradle DSL method not found: 'android()'
possible causes:
the project may be using a version of gradle that does not contain the method.
gradle settings.
the build file may be missing a gradle plugin.
apply gradle plugin.

这是我的毕业文件:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
}
}

allprojects {
repositories {
jcenter()
}
}
android {
compileSdkVersion 22
buildToolsVersion "22.0.0"
}

最佳答案

右键单击您的项目>打开模块设置>属性选项卡,然后更改:

Compile Sdk Verion to API 23: Android 6.0
Build Tools Version 23.0.0

enter image description here

关于android-studio - 构建工具版本android失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31485616/

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