Unable to find optional library – org.apache.http.legacy

Android Studio suddenly (and for no apparent reason) started complaining that it could not find org.apache.http.legacy (which was added to build.gradle as a legacy library).

Warning: Unable to find optional library: org.apache.http.legacy

The issue was caused by a missing optional.json file that was supposed to be located in Android SDK folder …AndroidSDK\platforms\android-23\optional

 

 

The error was resolved by re-installing Android SDK (v23 – Android 6.0).

Content of the missing optional.json file was:


[
{
"name": "org.apache.http.legacy",
"jar": "org.apache.http.legacy.jar",
"manifest": false
}
]

Android Studio 1.5.1
Android SDK 23


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Captcha
captcha
Reload