首页 > 技术文章 > Android 开源项目精选

lovecode521 2016-06-28 14:29 原文

0x00  leakcanary 【内存泄漏检测】

Leakcanary : A memory leak detection library for Android and Java.

良心企业Square最近刚开源的一个非常有用的工具,强烈推荐

帮助你在开发阶段方便的检测出内存泄露的问题,使用起来更简单方便

Tips:

A very useful tool for corporate conscience Square recently gettin source, it is strongly recommended

Help you in the development stage to facilitate detect memory leak problem, More simple and convenient to use

Leakcanary开源项目地址:https://github.com/square/leakcanary

 

0x01 OKHttp 【Android Http请求库】

OKHttp:  An HTTP+HTTP/2 client for Android and Java applications

OkHttp 是一个 Java 和 Android 平台的 Http 请求库,非常高效,支持 SPDY、连接池、GZIP 和 HTTP 缓存。

默认情况下,OKHttp 会自动处理常见的网络问题,像二次连接、SSL 的握手问题。

 

Retrofit : Type-safe HTTP client for Android and Java by Square

Retrofit 是一套 RESTful 架构的 Android 和 Java 平台 Http 请求库的客户端实现,基于注解,

提供JSON to POJO(Plain Ordinary Java Object,简单Java对象),

POJO to JSON,网络请求(POST,GET,PUT,DELETE等)封装。

但是如果你的应用程序中集成了 OkHttp,Retrofit 默认会使用 OkHttp 处理其他网络层请求。

 

所以一句话如果你想让你的网络请求写的更优雅那推荐使用 Retrofit ,尤其是跟 RxJava 结合起来更好用,否则直接使用 OkHttp 一样是可以的。

 

Okhttp开源项目地址:https://github.com/square/okhttp

Retrofit 开源项目地址:https://github.com/square/retrofit

 

 0x02 picasso【图片加载】

Picasso: A powerful image downloading and caching library for Android

一个强大的图片加载和缓存Android库

调用方式:Picasso.with(context).load("http://i.imgur.com/DvpvklR.png").into(imageView);

 Picasso开源项目地址:   https://github.com/square/picasso

 

推荐阅读