Adding Uber Dependency gives error to my app - android

I'm trying to integrate uber in my mobile application.
When I try to add the dependency:
compile 'com.uber.sdk:rides-android:0.6.1'
This is my gradle:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.sumo.traffic"
minSdkVersion 18
targetSdkVersion 25
multiDexEnabled true
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
dexOptions {
javaMaxHeapSize "4g"
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':library2')
compile('com.google.http-client:google-http-client-jackson2:1.21.0') {
exclude group: 'org.apache.httpcomponents'
}
compile('com.google.api-client:google-api-client-android:1.17.0-rc') {
exclude module: 'httpclient'
}
compile('com.google.http-client:google-http-client-gson:1.17.0-rc') {
exclude module: 'httpclient'
}
compile project(path: ':Expandablelayout-library')
compile project(':compoundlayout')
// compile 'com.google.android.gms:play-services-appindexing:10.0.1'
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
compile 'com.sun.mail:android-mail:1.5.5'
compile 'com.sun.mail:android-activation:1.5.5'
compile 'com.uncopt:android.justified:1.0'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.google.android.gms:play-services:11.0.2'
compile 'com.google.maps.android:android-maps-utils:0.4.4'
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.google.maps:google-maps-services:0.1.17'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.squareup.okhttp:okhttp:2.7.5'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.7.5'
compile 'io.reactivex:rxjava:1.0.17'
compile 'io.reactivex:rxandroid:0.23.0'
compile 'com.squareup.okio:okio:1.1.0'
compile 'me.relex:circleindicator:1.2.2#aar'
compile 'de.keyboardsurfer.android.widget:crouton:1.8.5#jar'
compile 'com.google.android.gms:play-services-ads:11.0.2'
compile 'com.google.android.gms:play-services-auth:11.0.2'
compile 'com.google.android.gms:play-services-gcm:11.0.2'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.github.bluejamesbond:textjustify-android:2.1.6'
testCompile 'junit:junit:4.12'
}
repositories {
mavenCentral()
}
When I try to add uber dependency, it crashing the app.
But when I remove the uber dependency. Everything works.
I have no idea what's happening.

Unchecking instant - run fixed this.

Related

error when adding compile 'com.google.android.gms:play-services:11.0.1'

I have an error when I put
compile 'com.google.android.gms:play-services:11.0.1'
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "eyaa.compsproject"
minSdkVersion 16
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'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.android.gms:play-services:11.0.1'
compile 'com.google.firebase:firebase-core:10.0.1'
compile 'com.google.firebase:firebase-database:10.0.1'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
why red in line
compile 'com.android.support:appcompat-v7:25.3.1'
when using
compile 'com.google.android.gms:play-services:11.0.1'
The play service and firebase version needed to be same,
Please replace with below code and check.
compile 'com.google.android.gms:play-services:10.0.1'
compile 'com.google.firebase:firebase-core:10.0.1'
compile 'com.google.firebase:firebase-database:10.0.1'

All com.android.support libraries must use the exact same version spec

I have a problem in build.gradle (Module app) that I can not resolve
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "ahmedchtn.smartschool"
minSdkVersion 17
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'
//Displaying images
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:support-v7:25.0.3'
compile 'com.android.support:design:25.3.1'
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'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.google.firebase:firebase-auth:10.0.1'
//Firebase UI
compile 'com.firebaseui:firebase-ui-auth:0.6.0'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
The error is shown in this line
compile 'com.android.support:appcompat-v7:23.4.0'
Error message:
All com.android.support libraries must use the exact same version specification(mixing versions can lead to runtime crashes).Found versions 25.3.1,23.4.0.Examples include
com.android.support:animated-vector-drawable:25.3.1 and
com.android.support:cardview-v7:23.4.0
Use same version to all dependencies of support libraries. In your case change these dependency version to "25.3.1".
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:support-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'

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'

Buttknife not working with RXJava

Have problems with two libraries.
Gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "pe.com.gmd.innova.adexus.adexusday"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
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
}
}
/*
greendao {
schemaVersion 7
}*/
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(name: 'androidgmd2', ext: 'aar')
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:multidex:1.0.1'
compile 'org.greenrobot:greendao:3.2.2'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.androidanimations:library:1.1.3#aar'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.squareup.retrofit2:retrofit:2.0.2'
compile 'com.squareup.retrofit2:converter-gson:2.0.2'
compile 'com.viewpagerindicator:library:2.4.1#aar'
compile 'com.google.android.gms:play-services-location:10.2.1'
compile 'com.google.android.gms:play-services-maps:10.2.1'
compile 'com.google.firebase:firebase-messaging:10.0.1'
compile 'com.google.firebase:firebase-crash:10.0.1'
compile 'com.google.code.gson:gson:2.8.0'
compile 'me.dm7.barcodescanner:zbar:1.9.1'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha8'
compile 'com.android.support:support-v4:25.3.1'
testCompile 'junit:junit:4.12'
compile 'io.reactivex:rxandroid:1.2.0'
compile 'io.reactivex:rxjava:1.1.8'
compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
}
apply plugin: 'com.google.gms.google-services'
not have problems with gradle process any error..
so have problems in ejecuttion application.. because my buttknife not working injection.
Maybe exist version so working fine with rxjava librarys ? or the version is really low
my version library compile 'com.jakewharton:butterknife:7.0.1'
It looks like you are not importing AnnotationProcessor.
Try this with latest versions:
compile 'com.jakewharton:butterknife:8.6.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.6.0'

Duplicate entry error ByteOrderMark.class

i was getting the multidex error so, i enabled it and now i am getting this error :`
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: org/apache/commons/io/ByteOrderMark.class
gradle.build
apply plugin: 'com.android.application'
apply plugin: 'android-apt'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.example.test"
minSdkVersion 17
targetSdkVersion 25
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
manifestPlaceholders = [appPackageName: "com.example.test"]
}
android {
configurations.all {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:3.0.1'
}
}
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'
})
compile 'com.google.firebase:firebase-core:10.0.1'
compile 'com.google.firebase:firebase-messaging:10.0.1'
compile 'com.google.firebase:firebase-ads:10.0.1'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.firebase:firebase-client-android:2.5.2'
compile 'com.google.android.gms:play-services-auth:10.0.1'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.adobe.creativesdk.foundation:auth:0.9.1251'
compile 'com.adobe.creativesdk:image:4.8.4'
compile 'com.localytics.android:library:3.8.0'
compile 'com.ramotion.foldingcell:folding-cell:1.0.1'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.easing:library:1.0.1#aar'
compile 'com.daimajia.androidanimations:library:1.1.3#aar'
compile 'com.daimajia.numberprogressbar:library:1.2#aar'
compile 'com.github.javiersantos:BottomDialogs:1.2.1'
compile 'com.github.Yalantis:GuillotineMenu-Android:1.2'
compile 'com.github.hotchemi:permissionsdispatcher:2.0.7'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.eyalbira.loadingdots:loading-dots:1.0.2'
testCompile 'junit:junit:4.12'
apt 'com.github.hotchemi:permissionsdispatcher-processor:2.0.7'
}
apply plugin: 'com.google.gms.google-services'
`
I was also facing the same issue
after searching i found this solution
It is the duplicate issue
configurations {
all*.exclude group: 'commons-io'
}
Check this link
https://stackoverflow.com/a/36301313/6272799

Categories

Resources