Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

New warning when building android app with gradle

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

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

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

Anyone knows what it means ?

like image 727
M.Sameer Avatar asked May 19 '16 13:05

M.Sameer


People also ask

How do I fix Gradle issues?

For this, you have to connect your PC to the internet and you have to open your Android studio. After opening your project click on the Sync Project with Gradle files option. This will automatically download the new Gradle files and will fix the issue which is caused by the Gradle files.

What happens when Gradle build?

“build. gradle” are scripts where one can automate the tasks. For example, the simple task to copy some files from one directory to another can be performed by the Gradle build script before the actual build process happens.

Why is Gradle keeps downloading itself again and again with Android Studio?

Enable offline mode in Android Studio to disable checking for updates everytime. Go to Settings>Compiler>Gradle>Offline mode. If this is enabled the gradle will be told not to connect to internet and check for updates.

Why does Android Studio keep downloading Gradle?

Basically it downloads the Gradle build files for your current project according to its version and this whole work is done by your gradle wrapper which actually looks towards the basic requirement for your project and downloads the files according to that so whenever you are going to use any another projects of same ...


1 Answers

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

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' } 
like image 166
senneco Avatar answered Sep 24 '22 03:09

senneco