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
In Android Studio File -> Invalidate Caches/Restart solved the issue for me.
File -> Invalidate Caches/Restart