error "can not resolve simbol gson"

1

Hello when I import this library in android studio import com.google.gson.Gson; it tells me that can not resolve simbol gson Search it with the sdk manage in the google part and I do not find it, what can it be? I leave the build.gradle I do not know if it has to do with the sdk.

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"

defaultConfig {
    applicationId "aplicacionesmoviles.tp"
    minSdkVersion 18
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
}
    
asked by Diego 30.06.2016 в 09:38
source

2 answers

1

You have to add the dependency to Gson in your build.gradle

dependencies {
  //Resto de dependencias de tu proyecto
  compile 'com.google.code.gson:gson:2.7'
}

Greetings.

    
answered by 30.06.2016 / 09:54
source
1

There is the option of @Puas or you can also import the .jar and add it in Proyect Structure in Android Studio. I recommend this page to download libraries: link Greetings

    
answered by 05.07.2016 в 01:38