Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Warning:Ignoring Android API artifact com.google.android:android:4.1.1.4

Android Studio this morning added external libraries to my project. Now when building my project I get

Warning:Ignoring Android API artifact com.google.android:android:4.1.1.4 for debug

Does anyone know what this means?

like image 562
Christine Avatar asked Dec 02 '16 10:12

Christine


1 Answers

Does anyone know what this means?

Some dependency of the project has directly declared a dependency on a version of Android.

To fix

To locate the offending dependency do the following, then ideally, tell the authors of the library about their error. You can also explicitly avoid the problem while waiting for a fix:

Run ./gradlew app:dependencies and locate the line or lines that say:

+--- com.awesome:someawesomelibrary:1.0.0.0
|    +--- com.google.android:android:4.1.1.4

If this output is too long to find it, remember you can pipe it out to a text file by adding > out.txt

Now locate your gradle import of com.awesome:someawesomelibrary:1.0.0.0 and exclude android like so:

compile ('com.awesome:someawesomelibrary:1.0.0.0') {
    exclude group: 'com.google.android', module: 'android'
}
like image 144
weston Avatar answered Nov 11 '22 03:11

weston