android - Cannot resolve symbol GsonConverterFactory -
i error message if try use gsonconvertfactory:
cannot resolve symbol
gsonconverterfactory
i using this:
return new retrofit.builder() .baseurl(base_url) .client(client) //.addconverterfactory(moshiconverterfactory.create()) .addconverterfactory(gsonconverterfactory.create(gson)) .build();
this gradle file (module: app):
dependencies { ... releasecompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1' compile 'com.google.code.gson:gson:2.7' }
gsonconverterfactory resides in following dependency so, add in build.gradle
dependency.
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
Comments
Post a Comment