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 ?
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.
“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.
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.
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 ...
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' }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With