I just convert my project eclipse to the android studio, and now I want to add Google Interstitial Ads, but it gives an error like
Error:Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat; Error:Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoIcsImpl; Error:Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoStubImpl; Error:Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl; Error:Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompatIcs; Error:Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/ActivityCompat; Error:Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/ActivityCompatHoneycomb; Error:Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/ActivityCompatJB; Error:Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/ActivityOptionsCompat;
My Project Gradle file is :
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
//classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
jcenter()
maven {url 'https://maven.google.com'}
}
}
and my app module gradle is :
apply plugin: 'com.android.application'
dependencies {
compile fileTree(include: '*.jar', dir: 'libs')
compile project(':Rajawali')
compile project(':aFileChooser')
compile 'com.github.castorflex.smoothprogressbar:library:1.1.0'
compile 'com.google.android.gms:play-services-ads:11.0.4'
compile 'com.android.support:multidex:1.0.1'
}
android {
compileSdkVersion 27
buildToolsVersion "27.0.2"
dexOptions {
preDexLibraries = false
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
// Move the tests to tests/java, tests/res, etc...
instrumentTest.setRoot('tests')
// Move the build types to build-types/<type>
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
// This moves them out of them default location under src/<type>/... which would
// conflict with src/ being used by the main source set.
// Adding new build types or product flavors should be accompanied
// by a similar customization.
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
}
here is my all gradle file, now how can I add Google Interstitial Add in my App. I also try to add Google play service in my Project gradle file and add Google play service plugin in the module but not working.