Open
Description
@vietj hi
if got this kind of exception
java.lang.NoClassDefFoundError: io.vertx.core.ServiceHelper$$Lambda$0
at io.vertx.core.ServiceHelper.loadFactories(ServiceHelper.java:61)
at io.vertx.core.ServiceHelper.loadFactories(ServiceHelper.java:47)
at io.vertx.core.ServiceHelper.loadFactoryOrNull(ServiceHelper.java:37)
at io.vertx.core.ServiceHelper.loadFactory(ServiceHelper.java:29)
at io.vertx.core.Vertx.<clinit>(Vertx.java:524)
at io.vertx.core.Vertx$$CC.vertx$$STATIC$$(Unknown Source)
my gradle config :
android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
defaultConfig {
minSdkVersion 14
targetSdkVersion 22
versionCode 26
versionName "26"
......
dependencies {
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'com.google.code.gson:gson:2.8.4'
implementation 'com.julienviet:retrofit-vertx:1.0.0'
implementation 'org.jsoup:jsoup:1.10.3'
implementation 'com.android.support:multidex:1.0.3'
}
.....
and my client :
Vertx vertx = Vertx.vertx();
HttpClient client = vertx.createHttpClient(new HttpClientOptions()
.setProxyOptions(new ProxyOptions()
.setType(ProxyType.SOCKS5)
.setHost(host)
.setPort(port)));
service = new Retrofit.Builder()
.baseUrl(baseUrl)
.callFactory(new VertxCallFactory(client))
.addConverterFactory(HtmlConverterFactory.create(baseUrl))
.build().create(FetchHtmlService.class);
Metadata
Metadata
Assignees
Labels
No labels