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)
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'
}
I was able to solve the Warning message
Unable to find optional library: org.apache.http.legacy
By upgrading my Android studio. It was 1.3.2 . Now it is 2.2.