I'm trying to connect the Moxy library:

compile 'com.arello-mobile:moxy:0.4.2' compile 'com.arello-mobile:moxy-android:0.4.2' apt 'com.arello-mobile:moxy-compiler:0.4.2' 

Gradle gives this error:

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

Full build.gradle:

 apply plugin: 'com.android.application' apply plugin: 'com.neenbedankt.android-apt' apply plugin: 'me.tatarka.retrolambda' android { compileSdkVersion 24 buildToolsVersion "24.0.1" defaultConfig { applicationId "com.myapp" minSdkVersion 14 targetSdkVersion 24 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } } dependencies { final SUPPORT_LIBRARY_VERSION = '24.1.1' compile "com.android.support:appcompat-v7:$SUPPORT_LIBRARY_VERSION" compile "com.android.support:recyclerview-v7:$SUPPORT_LIBRARY_VERSION" ... compile 'com.arello-mobile:moxy:0.4.2' compile 'com.arello-mobile:moxy-android:0.4.2' apt 'com.arello-mobile:moxy-compiler:0.4.2' ... } 

What to do?

  • I get the same Warning, but the application is built and run. And you do not even run it? I understand that the question was asked a long time ago, but it may still be relevant =) - senneco

1 answer 1

The problem arose after com.android.tools.build:gradle was updated to version 2.2.0. Previously, this was not. For a hot fix, you must exclude com.google.android from dependencies:

 compile ('com.arello-mobile:moxy:0.5.4'){ exclude group: 'com.google.android' } compile ('com.arello-mobile:moxy-android:0.5.4'){ exclude group: 'com.google.android' } apt 'com.arello-mobile:moxy-compiler:0.5.4'