使用Gradle构建Android应用时的新警告 [英] New warning when building android app with gradle

查看:147
本文介绍了使用Gradle构建Android应用时的新警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

昨天很好,今天在清理或构建项目时显示此警告:

Yesterday it was fine, today it shows this warning when I clean or build the project:

警告:忽略Android API工件 com.google.android:android:2.1_r1 for appDebug警告:忽略Android 适用于appRelease的API工件com.google.android:android:2.1_r1

WARNING: Ignoring Android API artifact com.google.android:android:2.1_r1 for appDebug WARNING: Ignoring Android API artifact com.google.android:android:2.1_r1 for appRelease

我认为这是由于Android的gradle插件更新所致.

I think it was caused by an update of the gradle plugin for android.

有人知道这是什么意思吗?

Anyone knows what it means ?

推荐答案

通常,如果要在Android项目中使用Java库,则Java库取决于com.google.android:android.

Usually, java libraries depends on com.google.android:android if this library will be used in Android project.

然后,您可以从目标Android项目的依赖项中排除此模块.像这样:

Then you can exclude this module from dependencies of target Android project. Like this:

compile ('some.library.that.depends.on.android') {
    exclude group: 'com.google.android'
}

这篇关于使用Gradle构建Android应用时的新警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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