hegaojian / MvvmHelper

:chicken::basketball:这是一个快速开发的框架,Kotlin语言开发,MVVM+Jetpack架构,封装了公共头部、界面状态管理、ViewModel、LiveData、DataBinding、ViewBinding头部刷新、加载更多、沉浸式、全局通知、丰富好用的拓展函数、RxHttp网络请求等等一系列工具
Apache License 2.0
413 stars 58 forks source link

Duplicate class okhttp3.Address #29

Closed libeimarch closed 1 year ago

libeimarch commented 1 year ago

报这个错,咋整

hegaojian commented 1 year ago

android {
    ...
    configurations {
        all*.exclude group: 'com.squareup.okhttp3', module: 'okhttp'
    }
}
hegaojian commented 1 year ago

android {
    ...
    configurations {
        all*.exclude group: 'com.squareup.okhttp3', module: 'okhttp'
    }
}
hegaojian commented 1 year ago

试试上面这个方式

libeimarch commented 1 year ago

可以打包成功了,但运行报错 FATAL EXCEPTION: Anchors Thread #1 Process: com.ygb.driver, PID: 28608 java.lang.NoSuchMethodError: No static method get(Ljava/lang/String;)Lokhttp3/MediaType; in class Lokhttp3/MediaType; or its super classes (declaration of 'okhttp3.MediaType' appears in /data/app/~~egn6un_MJDhtTKxgz895GQ==/com.ygb.driver-4nFlhQ9xaQTa9wnCPgFZlw==/base.apk!classes12.dex) at rxhttp.wrapper.callback.JsonConverter.(JsonConverter.java:13) at rxhttp.wrapper.converter.GsonConverter.create(GsonConverter.java:45) at rxhttp.wrapper.converter.GsonConverter.create(GsonConverter.java:41) at rxhttp.RxHttpPlugins.(RxHttpPlugins.java:41) at rxhttp.RxHttpPlugins.(RxHttpPlugins.java:35) at rxhttp.RxHttpPlugins.init(RxHttpPlugins.java:52) at com.ygb.driver.app.InitNetWork.run(AppTaskFactory.kt:60) at com.effective.android.anchors.Task.run(Task.kt:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:930)