As you already read above, I am trying to configure a converter to retrofit
, all this in netbeans, for android it will be used and there it will be added with Gradle and in netbeans with maven
but at the time of doing the class where I set retrofit
and I'm going to add GSON
as a converter, netbeans does not recognize the instruction even if I add the import
:
import retrofit2.converter.gson.GsonConverterFactory;
I get the following message
package retrofit2.converter.gson does not exist
It is supposed to exist because I use the same version of retrofit
that I used in android 2.3.0
This is my code
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import okhttp3.Credentials;
import okhttp3.OkHttpClient;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory; //marca el error
/**
*
* @author
*/
public class ConfigRetrofit {
private static final String url = "mi url";
private static final OkHttpClient.Builder httpClient = new OkHttpClient.Builder();
private static Retrofit.Builder builder =
new Retrofit.Builder()
.baseUrl(url)
.addConverterFactory(GsonConverterFactory.create())
;
and on the side of my api with which I'm trying to connect is all right, what does not allow me to move forward is this, beware someone can help me, thank you in advance