android常用开源库volly下载

本文详细介绍了Volley作为Android平台上的网络通信库,如何使网络通信更快、更简单、更健壮。同时,AFinal作为一个强大的Android IoC ORM框架,通过FinalActivity、FinalBitmap、FinalDb、FinalHttp四大模块,提供了便捷的UI绑定、图片加载等功能。文中还指导了如何解决Volley下载时可能出现的连接超时问题,并提供了在Windows XP中配置环境变量和下载的具体步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 文章首发:安卓技术原创apkdoc

 
 

1. 什么是Volley

在这之前,我们在程序中需要和网络通信的时候,大体使用的东西莫过于AsyncTaskLoader,HttpURLConnection,AsyncTask,HTTPClient(Apache)等,今年的Google I/O 2013上,Volley发布了。Volley是Android平台上的网络通信库,能使网络通信更快,更简单,更健壮。
这是Volley名称的由来: a burst or emission of many things or a large amount at once

Volley主页 https://android.googlesource.com/platform/frameworks/volley

 http://www.youtube.com/watch?v=yhv8l9F44qo&feature=player_embedded

来源:

http://blog.youkuaiyun.com/t12x3456/article/details/9221611

 

2.Afinal是一个android的ioc,orm框架,内置了四大模块功能:FinalAcitivity,FinalBitmap,FinalDb,FinalHttp。

    通过finalActivity,我们可以通过注解的方式进行绑定ui和事件。通过finalBitmap,我们可以方便的加载bitmap图片,而无需考虑oom等问题
     https://github.com/yangfuhai/afinal
    介绍
    http://www.cnblogs.com/taoweiji/p/3174722.html

http://code.google.com/p/afinal/

 

 

其中volly下载

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

按照上面的方法,下载时,可能报连接超时,这是因为,android源码,默认下载是用匿名方式的,google为了某种性能和管理目的,做了限制,像一 般的,动态公网IP就 可能下载不了。为此,google提供了认证方式下载。

 

 

Using authentication

By default, access to the Android source code is anonymous. To protect the servers against excessive usage, each IP address is associated with a quota.

When sharing an IP address with other users (e.g. when accessing the source repositories from beyond a NAT firewall), the quotas can trigger even for regular usage patterns (e.g. if many users sync new clients from the same IP address within a short period).

In that case, it is possible to use authenticated access, which then uses a separate quota for each user, regardless of the IP address.

The first step is to create a password from the password generator and to save it in ~/.netrc according to the instructions on that page.

The second step is to force authenticated access, by using the following manifest URI:https://android.googlesource.com/a/platform/frameworks/volley. Notice how the /a/ directory prefix triggers mandatory authentication. You can convert an existing client to use mandatory authentication with the following command:

 

在windows xp中配置环境变量

 

配置_netrc文件,内容为在google生成的账号与密码

 

下载

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值