Skip to content
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

Incompatible with Android 11 and Target SDK 30 #55

Closed
tobrun opened this issue Jan 28, 2021 · 2 comments
Closed

Incompatible with Android 11 and Target SDK 30 #55

tobrun opened this issue Jan 28, 2021 · 2 comments
Labels
bug 🪲 Something isn't working

Comments

@tobrun
Copy link
Member

tobrun commented Jan 28, 2021

With target SDK set to 30 and running on an Android 11 device, we are running into an OkHttp issue:

   Caused by: java.lang.IllegalStateException: Expected Android API level 21+ but was 30
        at f.n0.m.a.u(:238)
        at f.n0.m.e.i(:202)
        at f.n0.m.e.<clinit>(:79)
        at f.n0.m.e.j(:85) 
        at f.e0.B(:263) 
        at f.e0.<init>(:229) 
        at f.e0$b.b(:1015) 
        at com.mapbox.common.module.okhttp.MapboxOkHttpService.<init>(:57) 
        at java.lang.reflect.Constructor.newInstance0(Native Method) 
        at java.lang.reflect.Constructor.newInstance(Constructor.java:343) 
        at com.mapbox.common.module.provider.MapboxModuleProvider$noArgConstructorCreator$1.getInstance(:108) 
        at com.mapbox.common.module.provider.MapboxModuleProvider.createModule(:69) 
        at com.mapbox.common.core.module.CommonSingletonModuleProvider$httpServiceInstance$2.invoke(:19) 
        at com.mapbox.common.core.module.CommonSingletonModuleProvider$httpServiceInstance$2.invoke(:14) 
        at e.l.getValue(:74) 
        at com.mapbox.common.core.module.CommonSingletonModuleProvider.getHttpServiceInstance(Unknown Source:7) 
        at com.mapbox.common.MapboxSDKCommonInitializer.loadHttpClient(:13) 
        at com.mapbox.common.MapboxSDKCommonInitializer.create(:36) 
        at com.mapbox.common.MapboxSDKCommonInitializer.create(:9) 
        at androidx.startup.a.b(:155) 
        at androidx.startup.a.a(:198) 
        at androidx.startup.InitializationProvider.onCreate(:42) 
        at android.content.ContentProvider.attachInfo(ContentProvider.java:2451) 
        at android.content.ContentProvider.attachInfo(ContentProvider.java:2421) 
        at android.app.ActivityThread.installProvider(ActivityThread.java:7509) 
        at android.app.ActivityThread.installContentProviders(ActivityThread.java:7032) 
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6921) 
        at android.app.ActivityThread.access$1600(ActivityThread.java:269) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2045) 
        at android.os.Handler.dispatchMessage(Handler.java:106) 
        at android.os.Looper.loop(Looper.java:233) 
        at android.app.ActivityThread.main(ActivityThread.java:7959) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:631) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:978) 

This issue stems from OkHttp because as are still using a 3.12.x version of the library to be able to support minSDK version of 19. To be investigated if this can be fixed from our end or if we are required to update to a minimum version of OkHttp 4.x and minSDK of 21.

@tobrun tobrun added the bug 🪲 Something isn't working label Jan 28, 2021
@tobrun
Copy link
Member Author

tobrun commented Jan 28, 2021

Users hitting this issue can work around it with forcing okhttp 3.12.12 or latest version of 3.14.x. We be looking to migrate to OkHttp 4.x but this will require us to bump minimum version of the SDK to 21.

@tobrun
Copy link
Member Author

tobrun commented Mar 30, 2021

okhttp 4.x landed with beta.16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant