将 Android volley 导入 Android Studio [英] Import Android volley to Android Studio

查看:25
本文介绍了将 Android volley 导入 Android Studio的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用谷歌的排球库

我使用的是 Android Studio,我知道如何添加 .jar 库.

I am using Android Studio and I know how to add .jar libraries.

但我无法使用 volley 文件创建 .jar 库:

But I could not create a .jar library with the volley files:

https://android.googlesource.com/platform/frameworks/volley

这是我所做的:(使用 Windows 7)

Here what I did: (using windows seven)

git clone https://android.googlesource.com/platform/frameworks/volley
cd volley
android.bat update project -p . --target android-19
ant.jar jar

然后我得到输出:

发生了 Java 异常.

A java exception has occured.

怎么了?如何添加非 .jar 库?

what is wrong? how can i add a not .jar library?

推荐答案

Volley 现在是 在 JCenter 上正式提供:

Volley is now officially available on JCenter:

将此行添加到您的 Android 项目的应用模块的 gradle 依赖项中:

Add this line to your gradle dependencies for your Android project's app module:

实现'com.android.volley:volley:1.1.1'

这篇关于将 Android volley 导入 Android Studio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆