Tried everything from stackoverflow. I have listed below all that I tried to rectify this error : (I know there are lot of answers for this. It's still isn't working for me)
- Checked for the presence of the .json file (check)
- Add the "useLibrary 'org.apache.http.legacy'" to app module gradle file (check)
- Add the .jar file from the sdk location to libs (check)
- Reinstall API 23 (check)
- Right click the jar from libs folder and add to library (check)
- Change location to avoid 256 characters. (check)
- add "compile fileTree(dir: 'libs', include: ['*.jar'])" to gradle file dependencies (was present by default) (check)
That is pretty much everything from all the answers. Can anyone please provide a soltuion? I have been on this for 10 hours; Reinstalling and changing scripts.
My Gradle :
apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.2" useLibrary 'org.apache.http.legacy' defaultConfig { applicationId "com.example.name" minSdkVersion 15 targetSdkVersion 23 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:24.0.0-alpha1' }