Gradle 和 Android 支持库 [英] Gradle and Android support library

查看:29
本文介绍了Gradle 和 Android 支持库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

几乎在每个 Android 应用程序中,我们都需要一些库项目,例如 ABS、HoloEverywhere 等.其中大部分都在 Maven Central 中,这很好.不好的是,它们中的大多数都依赖于支持库,并且自然而然地指向 Maven Central 中过时(我的意思是非常有缺陷)的版本.

In almost every Android app we need a couple of library projects like ABS, HoloEverywhere, etc. Most of these are in Maven Central, which is good. What is bad is, most of them depend on the support library and naturally point to the outdated (I mean very buggy) version in Maven Central.

我们目前使用自定义版本的 Android(使用 Maven Android SDK 部署器)和每个库(从 gi​​t 获取并调整了 Maven 依赖项)来维护我们自己的存储库.是否有更简单的方法来做到这一点,使用新的基于 Gradle 的构建系统(例如覆盖 aar 项目的依赖项)?

We are currently maintain our own repositories with custom versions of Android (using the Maven Android SDK deployer) and each library (fetched from git and with adjusted maven dependency). Will there be an easier way of doing this, using the new Gradle based build system (like overwriting dependencies of aar projects)?

推荐答案

我们将提供支持库的工件版本.敬请关注.

We will provide artifact versions of the support libraries. Stay tuned.

工件现在可用.您必须在 SDK 中下载Android Support Repository".gradle 构建系统会自动将其用作本地 Maven 存储库.

The artifacts are now available. You have to download "Android Support Repository" in your SDK. The gradle build system will automatically use this as a local Maven repository.

现在有 3 个工件:

com.android.support:support-v4:21.0.0
com.android.support:support-v13:21.0.0
com.android.support:gridlayout-v7:21.0.0
com.android.support:appcompat-v7:21.0.0

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

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