When trying to build OpenStreetMapView from git://github.com/osmdroid/osmdroid, I get this error:
failed to find target with hash string android-23: D:\\User
Had the same issue with another number, this worked for me:
Click the error message at top "Gradle project sync failed" where the text says ´Open message view´
In the "Message Gradle Sync" window on the bottom left corner, click the provided solution "Install missing ... "
Repeat 1 and 2 if necessary
23:08 Gradle sync failed: Failed to find target with hash string 'android-26' in: C:\Users\vik\AppData\Local\Android\Sdk
Android SDK providing a solution in the bottom left corner
AndroidSDK > SDK platforms > and install API Level 23
In Android Studio File -> Invalidate Caches/Restart
solved the issue for me.
I fixed the issue for me by opening the Android SDK Manager and installing the build tools for all 23.x.x versions.
See the screenshot.
Download the specific Android release from the link specified in the build console.
Note: I think this might be a bug in Android Studio.
Now revert Compiled Sdk Version back to Google API xx.
If this not work, then: