I guess, the easier way to solve this issue without having to reinstall the SDK is to create a file called optional.json
in <sdk-path>platformsandroid-23optional
directory with the following content:
[
{
"name": "org.apache.http.legacy",
"jar": "org.apache.http.legacy.jar",
"manifest": false
}
]
It solved the problem for me.
EDIT: Information taken from @domoch's answer below on how to locate your SDK location
To Locate your Android SDK's Location
Go to Android Studio Settings -> Appearence & Behavior -> System Settings
and look for Android SDK Location
. In Windows, it usually would be pointing to C:Users<username>AppDataLocalAndroidsdk
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…