This is because your support library is in conflict. You should always use the same version code for compileSdkVersion , buildToolsVersion , targetSdkVersion and support library .
You should not use jar file with
compile files('libs/support-v4-19.0.1.jar')
Instead, you need to use the support library that matches your compileSdkVersion as follows:
implementation 'com.android.support:support-v4:27.1.0'
You also need to use the exact version of the game service and make sure that you are using a specific individual API. Not this way:
compile 'com.google.android.gms:play-services:+'
But something like this:
// if you're using only ads implementation 'com.google.android.gms:play-services-ads:12.0.0'
this will make your method smaller, and then you can remove the multidex.
In the end, your build.gradle should be something like this:
android { compileSdkVersion 27 buildToolsVersion '27.0.1' defaultConfig { applicationId "com.drh.bird" minSdkVersion 14 targetSdkVersion 27 aaptOptions.cruncherEnabled = false aaptOptions.useNewCruncher = false compileOptions.encoding = 'ISO-8859-1' //multiDexEnabled = true ndk { moduleName "player_shared" } } android { useLibrary 'org.apache.http.legacy' } sourceSets { main { jni.srcDirs = [] } } buildTypes {} android { defaultConfig { //multiDexEnabled true } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7 } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' } } } dependencies { //compile 'com.android.support:multidex:1.0.1' implementation 'com.google.android.gms:play-services:play-services-ads:12.0.0' implementation 'com.android.support:support-v4:27.1.0' compile files('libs/dagger-1.2.2.jar') compile files('libs/javax.inject-1.jar') compile files('libs/nineoldandroids-2.4.0.jar') //compile files('libs/support-v4-19.0.1.jar') }
source share