【问题标题】:Updated android studio and Cannot find build tools 22 to add as dependency更新了 android studio 并找不到构建工具 22 添加为依赖项
【发布时间】:2015-08-25 11:28:17
【问题描述】:

我将 android studio 和构建工具更新到了最新版本。现在我想将 AppCompat v7 版本 22.0.1 依赖添加到我的项目中。

我在项目结构依赖列表中找不到它。

【问题讨论】:

    标签: android android-studio gradle build android-appcompat


    【解决方案1】:

    app-compat 22.0.1 不存在。

    您可以在build.gradle 中使用其中一种:

    dependencies{
    
      //it requires compileSdkVersion 23
      compile 'com.android.support:appcompat-v7:23.0.0'
    
      //it requires compileSdkVersion 22
      compile 'com.android.support:appcompat-v7:22.2.1'
      compile 'com.android.support:appcompat-v7:22.2.0'
      compile 'com.android.support:appcompat-v7:22.1.1'
      compile 'com.android.support:appcompat-v7:22.1.0'
      compile 'com.android.support:appcompat-v7:22.0.0'
    
      //it requires compileSdkVersion 21
      compile 'com.android.support:appcompat-v7:21.0.3'
      compile 'com.android.support:appcompat-v7:21.0.2'
      compile 'com.android.support:appcompat-v7:21.0.0'
    
    }
    

    【讨论】:

      【解决方案2】:

      Project Structure中,在您的module项目中,您没有“Dependencies”选项卡吗?

      在您的 build.gradle 'dependencies' 中,只添加这一行:

      compile 'com.android.support:appcompat-v7:22.0.1'
      

      它应该可以工作...

      【讨论】:

      • 它有 Dependencies 选项卡,但只显示 appcompat v7 23。而不是 22.0.1
      • 它现在显示这个错误 --> 错误:(41, 13) 无法解决: com.android.support:appcompat-v7:22.0.1 安装存储库并同步项目
        在文件中显示
        在文件中显示项目结构对话框
      • 但我无法安装所需的存储库。它在那里显示空包
      • 你检查你的 build.gradle 是哪个版本的 appcompat 吗?
      • build.gradle 有 com.android.support:appcompat-v7:22.0.1 。我在你回答之后添加了它。
      猜你喜欢
      • 1970-01-01
      • 2020-07-16
      • 2016-07-11
      • 2021-02-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多