导入模块 Volley 后出错

Error after importing module Volley

当我在 android studio 中安装模块 Volley 时,我收到错误消息:

Error:A problem occurred configuring project ':volley'. failed to find target with hash string 'android-22' in: C:\Users\ egen\AppData\Local\Android\sdk Open Android SDK Manager

我已经安装了 android 支持存储库这里有什么问题?

编辑

现在我收到错误:

错误:(10, 1) 评估根项目时出现问题 'Fysio5'。

Could not find method compile() for arguments [directory 'libs'] on org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler_Decorated@79554741.

这是我的 build.gradle:

 // 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.3.0'

        compile fileTree(dir: 'libs', include: ['*.jar'])
        compile 'com.android.support:appcompat-v7:23.0.1'
        compile project(":volley")
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

您似乎没有安装 Android 5.1.1 (API 22) SDK。打开 Android SDK 管理器检查并在必要时安装。

  1. 前往 app/src/build.gradle(见第一张图片)

  2. 将 compileSDKVersion 22 更改为 19(或更改为您正在使用的 API 级别)

  3. 同步项目(见第二张图片)