简体   繁体   English

如何修复构建工具(22.0.0 / 1)依赖性问题

[英]How to fix build tools (22.0.0/1) dependency issues

Before last month, I have been using Eclipse for android development. 在上个月之前,我一直在使用Eclipse进行android开发。 But now I am trying to use android studio because of the google's policy. 但现在我正在尝试使用Android工作室,因为谷歌的政策。

I am so tired. 我很累。

I ran across this error 我遇到了这个错误

在此输入图像描述

I don't understand this message. 我不明白这个消息。 Because I don't use "Build Tools revision 23.0.0 rc" I am using 22.0.0. 因为我不使用“Build Tools revision 23.0.0 rc”,所以我使用的是22.0.0。

compileSdkVersion 22
buildToolsVersion "22.0.0"

But I met that's error continue. 但我遇到了这个错误继续。 So I downloaded and Installed Build Tools 23.0.0 rc2. 所以我下载并安装了Build Tools 23.0.0 rc2。 But I met network error. 但我遇到了网络错误。

在此输入图像描述

Solutions please. 解决方案请。 I am tired. 我累了。

it happens because of build tools inconsistency. 它是因为构建工具不一致而发生的。 Firstly make sure 22 is installed then 23rc is not installed. 首先确保安装了22,然后没有安装23rc。

在此输入图像描述

After that in your Android Studio Open Gradle Scripts >> build.gradle (Module:app). 之后在Android Studio Open Gradle Scripts >> build.gradle(Module:app)中。 Make sure the installed build tool which is 22.0.1 in me is declared here. 确保在此处声明了22.0.1中安装的构建工具。 After changing the numbers make sure you rebuild/sync/refresh the project. 更改数字后,请确保重建/同步/刷新项目。 And you are done. 你完成了。 Note: Make sure this is done to all of your projects 注意:确保已对所有项目执行此操作

在此输入图像描述

I am new to the Android programming. 我是Android编程的新手。 But I now get this error. 但我现在得到这个错误。 On 8/28/2015, I have with the SDK Manager on the Android Studio (1.3.2 Build 141.2178183), while my current project was opened, installed new, previously not installed packages and also I have done other recommended update. 2015年8月28日,我在Android Studio(1.3.2 Build 141.2178183)上安装了SDK Manager,同时打开了我当前的项目,安装了新的,以前没有安装的软件包,还做了其他推荐的更新。 Subsequently, I received the error message "Install Build Tool revision 23.0.0. rc2" and "Gradle project sync failed. Basic functionality (eg.. Try Again Open 'Messages' View Show Log in Explorer". I have tried it without success. 随后,我收到错误消息“安装构建工具版本23.0.0.rc2”和“Gradle项目同步失败。基本功能(例如,再试一次打开'消息'查看在资源管理器中显示日志”。我试过没有成功。

Uninstall/new install Build-Tools in the SDK manager brought no change. 卸载/新安装SDK管理器中的Build-Tools没有任何变化。 There was a "Build Tools revsion 232.0 rc2" also not to be found. 还有一个“Build Tools revsion 232.0 rc2”也找不到。

Therefore, I have looked at the Grandle files accurately. 因此,我已经准确地查看了Grandle文件。 The file build.gradle (Module: app) in C: \\ Users \\ \\ AndroidStudioProjects \\ \\ app \\ build.gradle contained the following entry: C:\\ Users \\ \\ AndroidStudioProjects \\ \\ app \\ build.gradle中的文件build.gradle(Module:app)包含以下条目:

android {
    compileSdkVersion 22
    buildToolsVersion "23.0.0 rc3"

I have changed this with an editor: 我用编辑改了这个:

android {
    compileSdkVersion 22
    buildToolsVersion "23.0.0"

Then I could call up the project again without errors and also perform a synchronization. 然后我可以再次调用项目而不会出错并执行同步。

I tried above solution it seemed not to work at first but try looking into all build files. 我试过上面的解决方案,它似乎一开始不工作,但尝试查看所有构建文件。 For example if your project has got multiple modules say wearable module or like update its gradle build file too. 例如,如果您的项目有多个模块,请说可穿戴模块或类似更新其gradle构建文件。

It seems to be answered perfectly here: https://stackoverflow.com/a/28159380/3436166 它似乎在这里得到了完美的回答: https//stackoverflow.com/a/28159380/3436166

Just install the required version of Build Tools and the dependency issue will be solved. 只需安装所需版本的Build Tools,就可以解决依赖性问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何解决AndroidStudio中的依赖性问题? - How to fix dependency issues in AndroidStudio? 有谁知道如何解决此构建工具版本错误? - Does anyone know how to fix this build tools version error? 如何修复“Android SDK Build Tools 版本 (27.0.3) 被忽略...” - How to fix "Android SDK Build Tools version (27.0.3) is ignored..." 安装的 Build Tools 版本 28.0.3 已损坏。 如何修复此错误 - Installed Build Tools revision 28.0.3 is corrupted. How to fix this error Android级语法和构建工具兼容性问题 - Android grade syntax and build tools compatibility issues 如何在使用“classpath”com.android.tools.build:gradle:2.3.3'时修复build.gradle错误 - How to fix build.gradle error while using “ classpath 'com.android.tools.build:gradle:2.3.3' ” 导入支持-v4-22.0.0时,Gradle构建失败 - Gradle build failed when import support-v4-22.0.0 如何修复依赖解析错误? - How to fix dependency resolution errors? 更新了android studio并找不到构建工具22作为依赖添加 - Updated android studio and Cannot find build tools 22 to add as dependency 使用 Jococo 作为依赖项时,如何修复 Android Studio 中的 Build.gradle() 错误? - How to fix Build.gradle() error in Android Studio when using Jococo as a dependency?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM