So i added gson-2.2.4.jar to the libs dir (I\'m using android studio). My project couldn\'t find the gson stuff so I added it as a library dependency to my module in the \"P
I faced the same issue. I just added a single line as shown below in my build.gradle dependencies (without adding any jar in project structure) and it worked for me.
dependencies {
compile 'com.google.code.gson:gson:2.2.+'
compile 'com.android.support:support-v4:13.0.+'
compile 'com.android.support:appcompat-v7:18.0.+'
}
Along with above, I found few more things which are required for this to work.
Make sure you have android:targetSdkVersion="18" in AndroidManifest.xml file.
Make sure you have targetSdkVersion 18 in build.gradle file.
defaultConfig {
minSdkVersion 10
targetSdkVersion 18
}
Make sure you are connected to internet; so that jars will be downloaded from online central maven repository.