Closed patrykpoborca closed 8 years ago
Config okhttp 3.0.0 with retrofit 2.0.0-snapshot also dont work
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.squareup.retrofit2:converter-gson:2.0.0-beta3'
compile 'com.squareup.retrofit2:retrofit:2.0.0-SNAPSHOT'
provided 'org.glassfish:javax.annotation:10.0-b28'
compile 'com.github.bumptech.glide:glide:3.5.2'
compile 'com.jakewharton:butterknife:7.0.1'
That won't use the snapshot because you are using an older version of the Gson converter.
Both of you can use the 'dependencies' task to see that an older version of Retrofit is actually being used.
On Sun, Jan 24, 2016, 2:30 PM Nikunj notifications@github.com wrote:
Config okhttp 3.0.0 with retrofit 2.0.0-snapshot also dont work
compile 'com.android.support:appcompat-v7:23.1.1' compile 'com.android.support:design:23.1.1' compile 'com.android.support:support-v4:23.1.1' compile 'com.nineoldandroids:library:2.4.0' compile 'com.squareup.retrofit2:converter-gson:2.0.0-beta3' compile 'com.squareup.retrofit2:retrofit:2.0.0-SNAPSHOT' provided 'org.glassfish:javax.annotation:10.0-b28' compile 'com.github.bumptech.glide:glide:3.5.2' compile 'com.jakewharton:butterknife:7.0.1'
— Reply to this email directly or view it on GitHub https://github.com/square/retrofit/issues/1519#issuecomment-174333123.
@JakeWharton
It looks like the proper version is being used no? Or am i thinking of the wrong command
gist to keep formatting
+--- com.android.support:appcompat-v7:23.1.1 | \--- com.android.support:support-v4:23.1.1 | \--- com.android.support:support-annotations:23.1.1 +--- com.android.support:design:23.1.1 | +--- com.android.support:appcompat-v7:23.1.1 (*) | +--- com.android.support:recyclerview-v7:23.1.1 | | +--- com.android.support:support-annotations:23.1.1 | | \--- com.android.support:support-v4:23.1.1 (*) | \--- com.android.support:support-v4:23.1.1 (*) +--- com.android.support:cardview-v7:23.1.1 +--- com.squareup.retrofit2:retrofit:2.0.0-beta3 | \--- com.squareup.okhttp3:okhttp:3.0.0-RC1 -> 3.0.1 | \--- com.squareup.okio:okio:1.6.0 +--- com.squareup.retrofit2:converter-gson:2.0.0-beta3 | +--- com.squareup.retrofit2:retrofit:2.0.0-beta3 (*) | \--- com.google.code.gson:gson:2.4 -> 2.5 +--- com.squareup.retrofit2:adapter-rxjava:2.0.0-beta3 | +--- com.squareup.retrofit2:retrofit:2.0.0-beta3 (*) | \--- io.reactivex:rxjava:1.1.0 +--- org.jetbrains.kotlin:kotlin-stdlib:1.0.0-beta-4589 | \--- org.jetbrains.kotlin:kotlin-runtime:1.0.0-beta-4589 +--- com.facebook.stetho:stetho:1.3.0 | +--- com.google.code.findbugs:jsr305:2.0.1 | \--- commons-cli:commons-cli:1.2 +--- com.facebook.stetho:stetho-okhttp3:1.3.0 | +--- com.google.code.findbugs:jsr305:2.0.1 | +--- com.squareup.okhttp3:okhttp:3.0.1 (*) | \--- com.facebook.stetho:stetho:1.3.0 (*) +--- com.squareup.okhttp3:okhttp:3.0.0-RC1 -> 3.0.1 (*) +--- com.google.code.gson:gson:2.5 +--- com.android.databinding:library:1.0-rc3 | +--- com.android.databinding:baseLibrary:1.0-rc3 -> 1.0-rc5 | \--- com.android.support:support-v4:21.0.3 -> 23.1.1 (*) +--- com.android.databinding:baseLibrary:1.0-rc5 \--- com.android.databinding:adapters:1.0-rc3 \--- com.android.databinding:library:1.0-rc3 (*)
That shows 2.0.0-beta3 is being used with OkHttp 3.0.1 which will not work. 2.0.0-SNAPSHOT needs to be used.
On Sun, Jan 24, 2016, 7:42 PM Patryk Poborca notifications@github.com wrote:
@JakeWharton https://github.com/JakeWharton
It looks like the proper version is being used no? Or am i thinking of the wrong command +--- com.android.support:appcompat-v7:23.1.1 | --- com.android.support:support-v4:23.1.1 | --- com.android.support:support-annotations:23.1.1 +--- com.android.support:design:23.1.1 | +--- com.android.support:appcompat-v7:23.1.1 () | +--- com.android.support:recyclerview-v7:23.1.1 | | +--- com.android.support:support-annotations:23.1.1 | | --- com.android.support:support-v4:23.1.1 () | --- com.android.support:support-v4:23.1.1 () +--- com.android.support:cardview-v7:23.1.1 +--- com.squareup.retrofit2:retrofit:2.0.0-beta3 | --- com.squareup.okhttp3:okhttp:3.0.0-RC1 -> 3.0.1 | --- com.squareup.okio:okio:1.6.0 +--- com.squareup.retrofit2:converter-gson:2.0.0-beta3 | +--- com.squareup.retrofit2:retrofit:2.0.0-beta3 () | --- com.google.code.gson:gson:2.4 -> 2.5 +--- com.squareup.retrofit2:adapter-rxjava:2.0.0-beta3 | +--- com.squareup.retrofit2:retrofit:2.0.0-beta3 () | --- io.reactivex:rxjava:1.1.0 +--- org.jetbrains.kotlin:kotlin-stdlib:1.0.0-beta-4589 | --- org.jetbrains.kotlin:kotlin-runtime:1.0.0-beta-4589 +--- com.facebook.stetho:stetho:1.3.0 | +--- com.google.code.findbugs:jsr305:2.0.1 | --- commons-cli:commons-cli:1.2 +--- com.facebook.stetho:stetho-okhttp3:1.3.0 | +--- com.google.code.findbugs:jsr305:2.0.1 | +--- com.squareup.okhttp3:okhttp:3.0.1 () | --- com.facebook.stetho:stetho:1.3.0 () +--- com.squareup.okhttp3:okhttp:3.0.0-RC1 -> 3.0.1 () +--- com.google.code.gson:gson:2.5 +--- com.android.databinding:library:1.0-rc3 | +--- com.android.databinding:baseLibrary:1.0-rc3 -> 1.0-rc5 | --- com.android.support:support-v4:21.0.3 -> 23.1.1 () +--- com.android.databinding:baseLibrary:1.0-rc5 --- com.android.databinding:adapters:1.0-rc3 --- com.android.databinding:library:1.0-rc3 ()
— Reply to this email directly or view it on GitHub https://github.com/square/retrofit/issues/1519#issuecomment-174357373.
Yep. thanks for pointing that out. I totally missed that. Didn't realize it was changing... Is the reason for this because my other dependencies simply haven't updated to the OKHttp?
Also to anyone else, don't forget to add this to your project build.gradle
(I had it in my buildscript in my app/build.gradle
and gradle couldn't find the snapshot... whooops.
I'm getting the
AbstractMethodError
with this build.gradle... I saw talk about having the proper versions of retrofit2 and okhttp3 shown at this issue... but even after setting them up I still get the error. (I am using Kotlin. Perhaps this is a contributing factor?)On seperate note, if I was using the rx-java adapter originally but I was getting an
IllegalStateException.closed
so I tried the regularCall
from Retrofit and got the above instead...