是Maven仓库持有相同的Andr​​oid依赖的摇篮吗? [英] Is the Maven repository holding the same Android dependencies as the Gradle one?

查看:152
本文介绍了是Maven仓库持有相同的Andr​​oid依赖的摇篮吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在做Android应用程序,需要最新的支持库。

I'm doing an Android app that needs the latest support library.

如果我理解正确的最新版本是22.2.0

If I understand correctly the latest version is 22.2.0

所以我试图让com.android.support - 应用程序兼容性-V7版本22.2.0的依赖,但它没有在search.maven.org

So I'm trying to get the com.android.support - appcompat-v7 version 22.2.0 dependency but it is not found on search.maven.org

正如人们可以看到,这是本文由依赖的gradle要求之一:

As one can see, it is the one required by the gradle dependency on this article:

http://androidgifts.com/navigation-view-using-design-support-library/#comment-11

最新的Andr​​oid SDK Android的sdk_r24.3.3-linux.tar没有它。它只有在22.2.0版本。

The latest android sdk android-sdk_r24.3.3-linux.tar does not have it. It only has the 22.2.0 version.

为什么Maven不有吗?

How come Maven does not have it ?

任何方式下载呢?

推荐答案

我只是跟着我的Maven项目在这个计算器的答案的步骤:的 http://stackoverflow.com/a/22602712/4405559 和它完美的作品。

I have just followed the steps in this stackoverflow answer in my maven project: http://stackoverflow.com/a/22602712/4405559 and it works perfectly.

    <dependency>
        <groupId>com.android.support</groupId>
        <artifactId>appcompat-v7</artifactId>
        <version>22.2.0</version>
        <type>aar</type>
    </dependency>

该依赖的gradle将是:

The gradle dependency would be:

compile 'com.android.support:appcompat-v7:22.2.0@aar'

(如果它没有找到它,你可能需要将本地支持Android m2repository文件夹添加到您的仓库看到这个答案:<一href=\"http://stackoverflow.com/a/25365406/2199475\">http://stackoverflow.com/a/25365406/2199475)

只要确保你有在Android SDK管理器更新运行检查和安装正确的API和SDK相关的构建工具。

Just make sure you have run check for updates in the Android SDK Manager and install the correct api and associated SDK Build-tools.

这篇关于是Maven仓库持有相同的Andr​​oid依赖的摇篮吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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