Duplicate values issue in Android Studio gradle - android

I have been trying to add a dependency of com.shamanland:fonticon:0.1.8 but as I add this I get the error
error: duplicate value for resource 'attr/textSize' with config ''.
error: resource previously defined here.
There are too many values with duplication issue to remove the values.
I have tried changing compileSdkVersion and targetSdkVersion to 25 but this did not help either.
I tried to use exclude but I don't know what to exclude exactly. Can anyone help me with this issue? Thank you.
My gradle:
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
android {
configurations {
all*.exclude module: 'okhttp'
all*.exclude module: 'okio'
}
compileSdkVersion 27
buildToolsVersion '27.0.2'
defaultConfig {
applicationId "com.abc.def"
vectorDrawables.useSupportLibrary = true
minSdkVersion 17
targetSdkVersion 27
versionCode 15
versionName "1.2.4"
multiDexEnabled = true
}
buildTypes {
release {
lintOptions {
disable 'MissingTranslation'
checkReleaseBuilds false
}
minifyEnabled false
}
}
aaptOptions {
cruncherEnabled = false
}
dexOptions {
javaMaxHeapSize "2g"
}
}
repositories {
maven { url 'https://maven.fabric.io/public' }
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:design:27.0.2'
compile 'com.android.support:appcompat-v7:27.0.2'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:percent:27.0.2'
compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.4.1'
compile 'com.jakewharton:butterknife:8.5.1'
compile 'com.google.code.gson:gson:2.6.2'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.android.support:recyclerview-v7:27.0.2'
compile 'com.android.support:cardview-v7:27.0.2'
provided 'org.projectlombok:lombok:1.16.16'
compile 'pl.droidsonroids.gif:android-gif-drawable:1.2.8'
annotationProcessor "org.projectlombok:lombok:1.16.16"
compile 'com.google.android.gms:play-services-maps:11.0.1'
testCompile 'junit:junit:4.12'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.6.0'
compile 'com.chauthai.swipereveallayout:swipe-reveal-layout:1.4.0'
compile 'com.theartofdev.edmodo:android-image-cropper:2.4.+'
compile 'com.mikhaellopez:circularimageview:3.0.2'
compile 'com.wdullaer:materialdatetimepicker:3.2.2'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.github.jd-alexander:library:1.1.0'
compile 'com.google.android.gms:play-services-location:11.0.1'
compile 'com.google.android.gms:play-services-maps:11.0.1'
compile 'com.yarolegovich:discrete-scrollview:1.2.0'
compile 'com.miguelcatalan:materialsearchview:1.4.0'
compile 'com.wang.avi:library:2.1.3'
compile 'com.google.firebase:firebase-core:11.0.1'
compile 'com.google.firebase:firebase-messaging:11.0.1'
compile 'com.android.support:multidex:1.0.0'
compile 'com.github.ksoichiro:android-observablescrollview:1.5.0'
compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
compile 'com.hedgehog.ratingbar:app:1.1.2'
compile 'com.eftimoff:android-pathview:1.0.8#aar'
compile('com.crashlytics.sdk.android:crashlytics:2.6.8#aar') {
transitive = true;
}
compile 'uk.co.chrisjenx:calligraphy:2.3.0'
apply plugin: 'com.google.gms.google-services'
compile 'com.stone.vega.library:VegaLayoutManager:1.0.1'
compile project(':library')
compile 'me.henrytao:smooth-app-bar-layout:24.1.0.0'
compile project(':PayTabs_SDK')
/*----------------payfort sdk------------*/
implementation 'com.victor:lib:1.0.1'
implementation 'com.shamanland:fonticon:0.1.8'
implementation('com.nispok:snackbar:2.11.+') {
// exclusion is not necessary, but generally a good idea.
exclude group: 'com.google.android', module: 'support-v7'
}
implementation 'com.google.guava:guava:18.0'
implementation 'org.bouncycastle:bcprov-jdk16:1.46'
implementation 'commons-codec:commons-codec:1.10'
implementation project(':FORTSDKv1.4.4')
}

It may be due to the implementation of other external dependency. In my case, I try removing the external dependency one by one. Most Probably while adding dependency the same dependency was used on other external dependency. So try removing library dependency one by one and see which was causing problem.

Related

Error with Android Expresso Testing: More than one library with package name 'android.support.test'

I am trying to integrate Expresso testing into my existing project. But there is a build error keep coming. What does this error message mean? I don't have duplicated packages in my project.
* What went wrong:
Execution failed for task ':drawingDesk_Android:processDebugAndroidTestResources'.
> Error: more than one library with package name 'android.support.test'
I have already gone through all my modules and tried to remove conflicting libraries. But error is still the same.
apply plugin: 'com.android.application'
android {
signingConfigs {
release {
}
}
compileSdkVersion 27
buildToolsVersion "27.0.1"
defaultConfig {
applicationId "com.axis.drawingdesk.v3"
minSdkVersion 23
targetSdkVersion 27
multiDexEnabled = true
renderscriptSupportModeEnabled false
testInstrumentationRunner = 'android.support.test.runner.AndroidJUnitRunner'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
aaptOptions {
cruncherEnabled = false
}
dexOptions {
javaMaxHeapSize "4g"
}
lintOptions {
checkReleaseBuilds false
}
sourceSets { main { res.srcDirs = ['src/main/res', 'src/main/res/xml'] } }
}
repositories {
mavenCentral()
maven { url "https://jitpack.io" }
}
dependencies {
compile files('libs/FlurryAnalytics-6.2.0.jar')
compile files('libs/adcolony.jar')
compile project(':unity-ads')
compile project(':photopickerlib')
compile files('libs/ofandroidlib.jar')
compile files('libs/axis-drawing-engine.jar')
compile project(':axisiaplib')
compile project(':viewpagerindicator')
compile project(':colorpickerlib')
compile project(':coloringbook')
compile files('libs/zip4j_1.3.2.jar')
compile project(':stickerlayer')
compile project(':filedownloader')
compile 'org.lucasr.twowayview:twowayview:0.1.4'
compile 'jp.wasabeef:blurry:1.0.5'
compile 'com.android.support:appcompat-v7:27.1.1'
compile 'com.android.support:design:27.1.1'
compile 'com.android.support:exifinterface:27.1.1'
compile 'com.android.support:multidex:1.0.1'
compile 'com.github.dmytrodanylyk.circular-progress-button:library:1.1.3'
compile 'com.github.sd6352051:NiftyNotification:1.2'
compile 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.3.0'
compile 'io.paperdb:paperdb:1.1'
compile 'com.jayway.android.robotium:robotium-solo:5.2.1'
compile 'com.zsoltsafrany:needle:1.0.0'
compile 'me.grantland:autofittextview:0.2.+'
compile 'jp.wasabeef:picasso-transformations:2.1.2'
compile 'com.google.android.gms:play-services-ads:15.0.1'
compile 'com.google.android.gms:play-services-auth:15.0.1'
compile 'com.google.firebase:firebase-ads:15.0.1'
compile 'com.google.firebase:firebase-core:16.0.0'
compile 'com.google.firebase:firebase-messaging:17.0.0'
compile 'com.google.firebase:firebase-storage:16.0.1'
compile 'com.google.firebase:firebase-database:16.0.1'
compile 'com.google.firebase:firebase-auth:16.0.1'
compile 'com.squareup.leakcanary:leakcanary-android:1.5.4'
compile 'com.android.support.constraint:constraint-layout:1.1.2'
compile 'com.android.support:recyclerview-v7:27.1.1'
compile 'com.github.bumptech.glide:glide:4.9.0'
compile 'com.nightonke:jellytogglebutton:1.0.2'
compile 'android.arch.lifecycle:extensions:1.1.1'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
compile 'org.jetbrains:annotations-java5:15.0'
compile 'com.facebook.stetho:stetho:1.5.1'
compile "com.android.support:support-core-utils:27.1.1"
compile project(':cropper')
testCompile 'junit:junit:4.12'
androidTestCompile 'junit:junit:4.12'
androidTestCompile('com.android.support.test:runner:1.0.2') {
exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestCompile('com.android.support.test:rules:1.0.2') {
exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestCompile('com.android.support.test.espresso:espresso-core:3.0.2') {
exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestCompile('com.android.support.test.espresso:espresso-intents:3.0.2') {
exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestCompile('com.android.support.test.espresso:espresso-web:3.0.2') {
exclude group: 'com.android.support', module: 'support-annotations'
}
}
apply plugin: 'com.google.gms.google-services'
remove below line from your code, it'll work
testCompile 'junit:junit:4.12'

Android App Unable to generate signed apk with error com.android.build.api.transform.TransformException: java.util.zip.ZipException:

I was generating the APK for release, But facing following issues with the APK.
Stuck #
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/gcm/PendingCallback.class
Not able to proceed further with this issue.
Tried every other possible way to get rid of this error.
Here is the snapshot of my Gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.xxxxxxxxxxx.xxxxx"
minSdkVersion 18
targetSdkVersion 27
versionCode 1
versionName "1.0"
versionName getVersionName()
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
useLibrary 'org.apache.http.legacy'
}
dexOptions {
jumboMode true
javaMaxHeapSize "4g"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
defaultConfig {
multiDexEnabled = true
vectorDrawables.useSupportLibrary = true
}
configurations {
all*.exclude group: 'com.android.support', module: 'support-v4'
all*.exclude group: 'com.android.support', module: 'support-annotations'
all*.exclude module: 'play-services-awareness'
}
}
//repositories {
// maven { url 'https://zendesk.jfrog.io/zendesk/repo' }
//}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:support-v4:27.1.0'
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support:design:27.1.0'
implementation 'com.android.support:support-vector-drawable:27.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.android.support:cardview-v7:27.1.0'
compile 'com.github.silvestrpredko:dot-progress-bar:1.1'
compile 'com.github.d-max:spots-dialog:0.4#aar'
compile 'com.github.clans:fab:1.6.2'
compile 'com.daimajia.slider:library:1.1.5#aar'
compile 'com.prolificinteractive:material-calendarview:1.4.3'
compile 'fr.avianey.com.viewpagerindicator:library:2.4.1.1#aar'
compile 'com.synnapps:carouselview:0.1.4'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.github.lawloretienne:discreteslider:0.0.9'
compile 'com.appyvet:materialrangebar:1.4.1'
compile 'com.getkeepsafe.taptargetview:taptargetview:1.11.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
//Swipe stack card Intergrtion
compile 'link.fls:swipestack:0.3.0'
compile 'in.arjsna:swipecardlib:1.0.2'
compile 'com.borax12.materialdaterangepicker:library:1.9'
compile 'com.mcxiaoke.volley:library-aar:1.0.0'
implementation project(':aphidFlipViewLibrary')
compile 'com.gjiazhe:PanoramaImageView:1.0'
implementation 'com.github.Q42:AndroidScrollingImageView:1.3.2'
compile 'com.github.lespinsideg:SimplePanorama:0.3.1'
compile ('co.realtime:messaging-android:2.1.58'){
exclude group: 'com.google.android.gms', module: 'play-services'
}
//gmail intergation
compile 'com.google.android.gms:play-services-auth:11.8.0'
compile 'com.google.firebase:firebase-core:11.8.0'
compile 'com.google.android.gms:play-services-maps:11.8.0'
compile 'com.google.android.gms:play-services:11.8.0'
compile 'com.google.android.gms:play-services-places:11.8.0'
compile 'com.google.android.gms:play-services-location:11.8.0'
compile 'com.mxn.soul:flowingdrawer-core:2.0.0'
compile 'com.yalantis:contextmenu:1.0.7'
compile 'com.github.florent37:materialimageloading:1.0.2'
compile 'com.pnikosis:materialish-progress:1.7'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.squareup.okhttp3:okhttp:3.2.0'
compile 'ch.acra:acra:4.6.1'
compile 'com.github.clans:fab:1.6.2'
compile 'com.koushikdutta.ion:ion:2.+'
compile 'com.squareup.okhttp3:logging-interceptor:3.0.1'
compile 'com.squareup.okio:okio:1.7.0'
compile 'com.squareup.retrofit2:converter-gson:2.0.1'
compile 'pub.devrel:easypermissions:0.2.0'
compile 'com.github.silvestrpredko:dot-progress-bar:1.1'
implementation 'com.android.support:mediarouter-v7:27.1.0'
compile 'org.florescu.android.rangeseekbar:rangeseekbar-library:0.3.0'
compile 'com.firebase:firebase-jobdispatcher:0.5.2'
compile 'com.android.support:multidex:1.0.1'
compile 'de.hdodenhof:circleimageview:2.2.0'
//gcm error
compile 'com.adjust.sdk:adjust-android-criteo:4.12.4'
compile 'com.seatgeek:placesautocomplete:0.3-SNAPSHOT'
implementation 'com.jakewharton:butterknife:8.4.0'
//ZENDEX
implementation group: 'com.zendesk', name: 'support', version: '2.0.0'
// compile project(':sdkui')
implementation 'com.github.takusemba:spotlight:1.3.3'
}
apply plugin: 'com.google.gms.google-services'
enable multidex in app module
defaultConfig {
multiDexEnabled true
}
dependencies {
implementation'com.android.support:multidex:1.0.1'
}
also set name attribute for application tag
like
<application
android:name="android.support.multidex.MultiDexApplication" >
</application>
You are repeating multiDexEnabled = true both in default config structure. Remove one of these.

Duplicate File Exception when using RxAndroid with retrofit

I am trying to use Retrofit with RxAndroid, so I imported the the required dependencies as shown below. but whn I run the App, I receive the following
error.:
Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/rxjava.properties
File1: C:\Users\PC-Amryi\.gradle\caches\modules-2\files-2.1\io.reactivex\rxjava\1.1.9\e4362e62f1ba92e360b197d6d7ffae67e5ecae9a\rxjava-1.1.9.jar
File2: C:\Users\PC-Amryi\.gradle\caches\modules-2\files-2.1\io.reactivex.rxjava2\rxjava\2.0.0\5151c737c01616c372c3d00ab145868ede10e826\rxjava-2.0.0.jar
to solve this issue I tried to use different RxAndroid and RxJava libs as follows:
//RxJava and RxAndroid
compile 'io.reactivex:rxandroid:1.2.1'
compile 'io.reactivex:rxjava:1.1.9'
//compile 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
//compile 'io.reactivex.rxjava2:rxjava:2.0.1'
//compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
compile 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
but I still get the same error
Please have a look at the gradle file poted below, and please help me to solve it
gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.example.pc_amr.rxretrofit_1"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
//to enable Java-8
jackOptions {
enabled true
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
//RxJava and RxAndroid
compile 'io.reactivex:rxandroid:1.2.1'
compile 'io.reactivex:rxjava:1.1.9'
//compile 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
//compile 'io.reactivex.rxjava2:rxjava:2.0.1'
//compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
compile 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.4.0'
//compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup:otto:1.3.8'
compile 'com.google.code.gson:gson:2.6.2'
compile 'com.android.support:recyclerview-v7:25.1.1'
compile 'com.squareup.okhttp3:okhttp:3.9.0'
compile 'com.google.code.gson:gson:2.8.1'
compile 'com.solidfire.code.gson:gson:2.6.2'
compile 'com.google.code.gson:gson-parent:2.8.1'
compile 'com.solidfire.code.gson:gson-parent:2.6.2'
compile 'com.android.support:support-annotations:25.1.1'
compile 'com.squareup.picasso:picasso:2.5.2'
}
It's
compile "com.squareup.retrofit2:retrofit:2.3.0"
compile "com.squareup.retrofit2:converter-gson:2.3.0"
compile "com.squareup.retrofit2:adapter-rxjava2:2.3.0"
compile "io.reactivex.rxjava2:rxandroid:2.0.1"
compile "io.reactivex.rxjava2:rxjava:2.1.2"
There's no need to exclude meta informations by using matching versions.

Build.Gradle (Module App ) unknown property

I have encountered this problem while syn of Gradle
This is the Code of build.gradle(Module app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "ahmedchtn.smartschool"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
//RecyclerView
//retrofit,gson
//glide
compile
'com.github.bumptech.glide:glide:3.7.0'
compile
'com.android.support:appcompat-v7:25.3.1'compile
'com.android.support.constraint:constraint-layout:1.0.2'compile
'com.android.support:support-v4:25.3.1'compile
'com.android.support:design:25.3.1'compile
'com.github.bumptech.glide:glide:3.7.0'compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.google.code.gson:gson:2.6.2'
compile 'com.squareup.retrofit2:retrofit:2.0.2'
compile 'com.squareup.retrofit2:converter-gson:2.0.2'
testCompile 'junit:junit:4.12'
}
I have tried to deleted some lines of compile but I did not arrive to resolve the problem,
You have few typos in your file:
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.android.support:appcompat-v7:25.3.1'
You should not have line break after compile.
Typical structure of dependencies block is:
dependencies {
// production
compile 'group:name:version'
// for local tests
testCompile 'group:name:version'
// for tests on device / emulator
androidTestCompile 'group:name:version'
}
If you really want to have line break (I don't even know why) you have to explicitly add parentheses around dependency definition:
compile (
'com.github.bumptech.glide:glide:3.7.0'
)
Change it to this.
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.google.code.gson:gson:2.6.2'
compile 'com.squareup.retrofit2:retrofit:2.0.2'
compile 'com.squareup.retrofit2:converter-gson:2.0.2'
testCompile 'junit:junit:4.12'

Gradle Errors After Adding Retrofit

For some reason, I am getting a strange error after adding Retrofit to a project that I inherited. If I remove Retrofit, the project builds but If I add it back then the error will re-appear.
How can I fix this issue? any suggestion is welcomed.
Here is the gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.domain.appname"
minSdkVersion 19
targetSdkVersion 24
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
mavenLocal()
flatDir {
dirs 'libs'
}
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:design:24.2.1'
compile 'com.android.support:recyclerview-v7:24.2.1'
compile 'com.android.support:cardview-v7:24.2.1'
compile 'com.google.firebase:firebase-core:10.0.1'
compile 'com.google.firebase:firebase-crash:10.0.1'
compile 'com.google.firebase:firebase-messaging:10.0.1'
compile 'com.google.firebase:firebase-config:10.0.1'
compile 'com.google.firebase:firebase-invites:10.0.1'
compile 'com.google.firebase:firebase-appindexing:10.0.1'
compile 'com.firebaseui:firebase-ui:1.0.1'
compile 'com.firebase:geofire-android:2.1.0'
compile 'com.makeramen:roundedimageview:2.2.1'
compile 'com.google.android.gms:play-services-maps:10.0.1'
compile 'com.karumi:dexter:2.3.1'
compile files('libs/YouTubeAndroidPlayerApi.jar')
compile 'com.google.code.gson:gson:2.7'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-simplexml:2.1.0'
}
And here is a screenshot of the error message that I am getting.
https://dl.dropboxusercontent.com/u/15447938/downloads/gradle_error.png
I ran gradlew app:dependencies and it was pointing to "UnsupportedClassVersionError"
Caused by: java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0
at org.gradle.api.internal.plugins.DefaultPluginRegistry$1.load(DefaultPluginRegistry.java:71)
at org.gradle.api.internal.plugins.DefaultPluginRegistry$1.load(DefaultPluginRegistry.java:51)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3524)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2317)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2280)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2195)
This turns out to be some transitive dependencies that Simple XML converter have on Android core. I fixed the issue per this StackOverflow question like this
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile ('com.squareup.retrofit2:converter-simplexml:2.1.0'){
exclude group: 'xpp3', module: 'xpp3'
exclude group: 'stax', module: 'stax-api'
exclude group: 'stax', module: 'stax'
}

Categories

Resources