导入模块Volley

时间:2015-09-30 12:45:57

标签: java android-volley

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

  

错误:配置项目':volley'时出现问题。   无法在以下位置找到具有哈希字符串'android-22'的目标:C:\ Users \ egen \ AppData \ Local \ Android \ sdk   打开Android SDK Manager

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

修改

现在我收到错误:

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

  

无法在org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler_Decorated@79554741上找到参数[directory'libs']的方法compile()。

这是我的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()
    }
}

2 个答案:

答案 0 :(得分:1)

  1. 转到app / src / build.gradle(参见第1张图片) enter image description here

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

  3. 同步项目(见第2张图片) enter image description here

答案 1 :(得分:0)

似乎,您没有安装Android 5.1.1(API 22)SDK。如有必要,请打开Android SDK管理器进行检查和安装。

相关问题