дооснащение 2.4 + адаптер-rxjava2 + proguard - PullRequest
0 голосов
/ 11 марта 2019

Screenshot

ошибка выглядит следующим образом:

03-11 14:28:14.401 11858 11858 E AndroidRuntime: Caused by:   java.lang.IllegalArgumentException: Unable to create call adapter for class  io.reactivex.Flowable
03-11 14:28:14.401 11858 11858 E AndroidRuntime:     for method RequestApis.getCameraInfo
03-11 14:28:14.401 11858 11858 E AndroidRuntime:    at retrofit2.ServiceMethod$Builder.methodError()
03-11 14:28:14.401 11858 11858 E AndroidRuntime:    at retrofit2.ServiceMethod$Builder.createCallAdapter()
03-11 14:28:14.401 11858 11858 E AndroidRuntime:    at retrofit2.ServiceMethod$Builder.build()
03-11 14:28:14.401 11858 11858 E AndroidRuntime:    at retrofit2.Retrofit.loadServiceMethod()
03-11 14:28:14.401 11858 11858 E AndroidRuntime:    at retrofit2.Retrofit$1.invoke()
03-11 14:28:14.401 11858 11858 E AndroidRuntime:    at java.lang.reflect.Proxy.invoke(Proxy.java:393)
03-11 14:28:14.401 11858 11858 E AndroidRuntime:    at $Proxy0.getCameraInfo(Unknown Source)
03-11 14:28:14.401 11858 11858 E AndroidRuntime:    at com.youlecamera.upload.helper.RetrofitHelper.getCameraInfo()
03-11 14:28:14.401 11858 11858 E AndroidRuntime:    at com.youlecamera.awsIot.IotService.bind()
03-11 14:28:14.401 11858 11858 E AndroidRuntime:    at com.youlecamera.awsIot.IotService.aZ()
03-11 14:28:14.401 11858 11858 E AndroidRuntime:    at com.youlecamera.awsIot.IotService$1.onReceive()
03-11 14:28:14.401 11858 11858 E AndroidRuntime:    at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:922)
03-11 14:28:14.401 11858 11858 E AndroidRuntime:    ... 7 more
03-11 14:28:14.401 11858 11858 E AndroidRuntime: Caused by:  java.lang.IllegalStateException: Flowable return type must be parameterized as  Flowable<Foo> or Flowable<? extends Foo>
03-11 14:28:14.401 11858 11858 E AndroidRuntime:    at retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory.get()
03-11 14:28:14.401 11858 11858 E AndroidRuntime:    at retrofit2.Retrofit.nextCallAdapter()
03-11 14:28:14.401 11858 11858 E AndroidRuntime:    at retrofit2.Retrofit.callAdapter()

мой гвардеец:

Proguard

Я много раз пытался модифицировать proguard, но это не сработало, Как я могу сделать? Кто может мне помочь? спасибо

мой код, как показано ниже, пожалуйста, помогите проверить, спасибо.

{
         ...
        OkHttpClient client = clientBuilder.build();
        Log.w(TAG, "RequestRetrofit", new Throwable());
        ...
        String url = (version == Constants.VERSION_PRE) ? RequestApis.HOST : RequestApis._HOST;
        Retrofit.Builder builder = new Retrofit.Builder()
                .baseUrl(url)
                .client(client)
                .addCallAdapterFactory(RxJava2CallAdapterFactory.create())
                .addConverterFactory(GsonConverterFactory.create());
        Retrofit retrofit = builder.build();
        service = retrofit.create(RequestApis.class);
    }
...