Solution 1 :
I found my mistake. I passed empty string. This wasn’t duplicated slash.
Problem :
After I uploaded new version of my app to Google Play, users who updated to the latest version in some of the request URLs have duplicated slash. If remove app from phone and install again from Play Market everything is OK. I tested in my two latest version. First I installed version 1.0 and under version 1.0 I installed version 1.1. After this some requests in URL have duplicated slash. But when installed only latest version everything works OK.
Duplicated slash: https:www.newsasa.com/subs//dash
I need: https:www.newsasa.com/subs/dash
final RETROFIT_VERSION = '2.7.1'
implementation "com.squareup.retrofit2:retrofit:$RETROFIT_VERSION"
implementation "com.squareup.retrofit2:converter-gson:$RETROFIT_VERSION"
implementation "com.squareup.retrofit2:adapter-rxjava2:$RETROFIT_VERSION"
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation 'io.reactivex.rxjava2:rxjava:2.2.16'
implementation 'com.squareup.okhttp3:okhttp:4.4.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.4.0'
Retrofit provideRetrofit(OkHttpClient okHttpClient, GsonConverterFactory gsonConverterFactory) {
return new Retrofit.Builder()
.baseUrl(https://mydomainname.com)
.client(okHttpClient)
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
.addConverterFactory(gsonConverterFactory)
.build();
}
@GET("/subscriptions/{account}/offers/{lang}")
Observable<List<Offer>> getOffers(@Path("account") String account, @Path("lang") String lang);
Comments
Comment posted by shmakova
Show your retrofit api class
Comment posted by Divyanshu
Show api client and api interface
Comment posted by TikTak
I updated question
Comment posted by TikTak
after I cleared data everthing works OK. What could be the problem?
Comment posted by github.com/square/retrofit/issues/3323
This my question in github