My gradle file:
apply plugin: \'com.android.application\' android { useLibrary \'org.apache.http.legacy\' compileSdkVersion 23 buildToolsVersion \
I had exactly the same issue. Please check if you have android-sdk-windows\platforms\android-23\optional\optional.json file in place. If not then just reinstall API 23 (remove and install again).
android-sdk-windows\platforms\android-23\optional\optional.json