I made a Bean Class but when i run it this is giving errors. I don't know how can i fix it. Please help me.
Error:(7, 8) error: cannot find symbol class SerializedNameError:Execution failed for task ':app:compileDebugJavaWithJavac'.
This is build.gradle:
apply plugin: 'com.android.application'android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.example.administrator.Myappliction"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}} dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
compile 'com.android.support:design:23.1.1'
compile files('libs/gson_1.7.jar')
compile files('libs/gson-2.2.4.jar')
compile "com.google.android.gms:play-services:8.3.0"}
in your model:
import com.google.gson.annotations.SerializedName;
in build.gradel add gson and converter-gson
dependencies {
.
.
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
implementation 'com.google.code.gson:gson:2.6.2'
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With