错误:包com.android.volley不存在

Sia*_*ash 3 android android-studio

我想在Android Studio中将Volley添加到我的android项目中.我从git下载了Volley,并使用Project Structure工具将其作为模块添加为android库.我修复了有关构建版本的错误,并且能够使用添加到项目中的新模块进行编译.我开始编写代码,Volley的东西甚至显示在我的自动完成中,包裹自动添加到我的源文件中.

但是当我编译时,我得到了 error: package com.android.volley does not exist

有谁知道我的问题是什么?

这是我的项目结构: 在此输入图像描述

这是我的应用build.gradle:

    apply plugin: 'com.android.application'

android {
    compileSdkVersion 20
    buildToolsVersion "20.0.0"

    defaultConfig {
        applicationId "com.loop"
        minSdkVersion 15
        targetSdkVersion 20
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:support-v13:20.0.0'
    compile 'com.google.android.gms:play-services:4.4.+'
}
Run Code Online (Sandbox Code Playgroud)

和settings.gradle:

include ':app', ':volley'

Sia*_*ash 10

我不得不compile project(':volley')在build.gradle下添加我的依赖项

所以最终的代码是

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:support-v13:20.0.0'
    compile 'com.google.android.gms:play-services:4.4.+'
    compile project(':volley')
}
Run Code Online (Sandbox Code Playgroud)