0

我已经将凌空库克隆到/Users/user/volley

如何将其作为模块导入到我的 android studio 项目中,由 gradle 提供支持,类似于 IntelliJ Idea 中的“导入模块”选项。

4

2 回答 2

2

并且新的 Android Studio 缺少 File -> Import 模块。

那是因为 AndroidStudio 与您的构建不再有任何关系。Gradle 是真正构建您的应用程序的人。如果您想将 volley 添加到您的项目中,您必须编辑build.gradle脚本。评论中有链接,或者您可以使用下一个作为片段:

repositories {
    maven {
        url 'https://github.com/Goddchen/mvn-repo/raw/master/'
    }
    mavenCentral()
}

dependencies {
    compile 'com.android:volley:1.0'
}

添加这些行后,按Sync project with gradle filesAndroidStudio 将导入您的模块。

于 2013-10-28T10:00:06.273 回答
2

现在依赖是这样的:

dependencies {
    compile 'com.mcxiaoke.volley:library:1.0.+'
}
于 2014-02-06T15:16:23.290 回答