I am using Android 1.5
(Win 8.1 x64), I forked the DrKLO/Telegram
repository on GitHub
and cloned it on my local machine. Now whenever I try to sync Gradle or clean/build project, the Gradle sync fails with this message:
Warning:Unable to find optional library: org.apache.http.legacy
build.gradle (Project: Telegram) [DrKLO/Telegram/blob/master/build.gradle]
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.1'
}
}
build.gradle (Module: TMessagesProj) [DrKLO/Telegram/blob/master/TMessagesProj/build.gradle]
apply plugin: 'com.android.application'
repositories {
mavenCentral()
}
dependencies {
compile 'com.android.support:support-v4:23.1.+'
compile 'com.google.android.gms:play-services:3.2.+'
compile 'net.hockeyapp.android:HockeySDK:3.6.+'
compile 'com.googlecode.mp4parser:isoparser:1.0.+'
}
android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
useLibrary 'org.apache.http.legacy'
...
}
I know there are many questions here, on StackOverflow, about this issue. But non of them have worked with me. I even tried some alternatives like copying the org.apache.http.legacy.jar
file from %USERPROFILE%\AppData\Local\Android\sdk\platforms\android-23\optional
to the libs
directory, and added it to the dependencies
compile files('libs/org.apache.http.legacy.jar')
Although, I really dislike this solution, but it didn't work either and Gradle still fails ...