Okhttp: AssertionError when running Unit Tests on Android with Robolectric

Created on 30 May 2016  路  4Comments  路  Source: square/okhttp

Started happening with OkHttp 3.3.1 (didn't try 3.3.0 out)

Relevant Stacktrace

java.lang.AssertionError
at okhttp3.internal.AndroidPlatform.isCleartextTrafficPermitted(AndroidPlatform.java:143)
at okhttp3.OkHttpClient.(OkHttpClient.java:73)
at okhttp3.OkHttpClient$Builder.(OkHttpClient.java:381)

Most helpful comment

You can workaround by setting @Config(sdk = 23) on each test

All 4 comments

Dupe #2533

Ups sorry for that

You can workaround by setting @Config(sdk = 23) on each test

Yeah I'm reading the issue. Thanks for the quick reply and the workaround

Was this page helpful?
0 / 5 - 0 ratings