-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
版本说明和依赖冲突的解决方案 #56
Comments
This was referenced May 16, 2019
Closed
Closed
Closed
项目更新了OkHttp 4.0.1 java.lang.NoSuchMethodError: No static method get(Lokhttp3/Response;)Lokhttp3/internal/http/StatusLine; in class Lokhttp3/internal/http/StatusLine; or its super classes (declaration of 'okhttp3.internal.http.StatusLine' appears in /data/app/com.tapplock.en.pad.debug-2/base.apk:classes3.dex)
at tech.linjiang.pandora.network.okhttp3.internal.huc.OkHttpURLConnection.getHeaderFields(OkHttpURLConnection.java:227)
at tech.linjiang.pandora.network.okhttp3.internal.huc.DelegatingHttpsURLConnection.getHeaderFields(DelegatingHttpsURLConnection.java:184)
at tech.linjiang.pandora.network.okhttp3.internal.huc.OkHttpsURLConnection.getHeaderFields(OkHttpsURLConnection.java:27)
at hh.a(:com.google.android.gms.dynamite_mapsdynamite@17455050@17.4.55 (040406-248795830):27)
at gx.b(:com.google.android.gms.dynamite_mapsdynamite@17455050@17.4.55 (040406-248795830):2)
at gy.a(:com.google.android.gms.dynamite_mapsdynamite@17455050@17.4.55 (040406-248795830):3)
at ha.a(:com.google.android.gms.dynamite_mapsdynamite@17455050@17.4.55 (040406-248795830):14)
at com.google.maps.api.android.lib6.drd.ak.a(:com.google.android.gms.dynamite_mapsdynamite@17455050@17.4.55 (040406-248795830):6)
at gc.a(:com.google.android.gms.dynamite_mapsdynamite@17455050@17.4.55 (040406-248795830):22)
at gc.run(:com.google.android.gms.dynamite_mapsdynamite@17455050@17.4.55 (040406-248795830):8) |
我看了下,OKHttp4.x开始已经用kotlin重写了,上面涉及到的方法调用方式已经改变,需要改下Pandora代码,所以无法简单的通过exclude来解决。但是考虑到不同项目依赖的OKHttp版本不一样,从兼容性方面来说,我还没找到一个好的解决方案 |
可以增加一个新的分支吗?pull request |
@whataa 请问怎么解决 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
版本说明
androidx
是Android官方推出的用于取代android-support
的依赖库,相对support包,除了包名不同,其余完全一致。目前有些项目已经迁移到了x,但是也有部分项目由于历史原因无法适配,因此为防止引入Pandora导致重复依赖,提供了以下两种版本:具体区别就是版本号前面是否包含
androix_
前缀。对于no-op
,由于没有引入对于的依赖库,因此不用区分。依赖问题
1. support冲突
Pandora使用的
findViewById
方法为 非强转类型 版本,需要compile-sdk至少为26
,所以对应的support-lib也需要至少为26.1.0
同时为了保持和官方版本同步,Pandora目前的compileSDK为 28,support版本为28.0.0,support包包含以下三种:
部分项目可能与此配置不一致导致 gradle sync 失败,又由于一些原因无法修改自身的配置,因此你可以按以下来修改对Pandora的依赖方式:
当然如果你引入了其它依赖库也间接依赖了不同版本的support包,你也需要自行
exclude
进行排除防止冲突。2. OKHttp依赖更新说明
Pandora依赖的OKHttp版本为
3.14.0
,如果和项目产生依赖冲突,你可以按照以上方案进行重新指定版本:The text was updated successfully, but these errors were encountered: