failed to find target with hash string android-23

后端 未结 20 2978
梦如初夏
梦如初夏 2020-12-02 16:18

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         


        
20条回答
  •  忘掉有多难
    2020-12-02 16:54

    There are 2 solutions to this issue:

    1) Download the relevant Android SDK via Tools -> Android -> SDK Manager -> SDK Tools (ensure you have 'Show Package Details') checked. Your case would be Android 6.0 (Marshmallow / API level 21)

    2) Alternatively, open your build.gradle file and update the following attributes :

    • compileSdkVersion
    • buildToolsVersion
    • targetSdkVersion

    either to the most recent version of the Android API that you have installed / another installed version you'd like to use (although I'd always recommend going with the latest version for the usual reasons: bug fixes etc.)

    If you're following step 2 it's also important that you remember to update the Android support library version if your app is using it. This can be found in the dependencies section of your build file and looks something like this:

    compile 'com.android.support:appcompat-v7:27.0.2'

    (replace 27.0.2 with the most recent support library version for the API level you intend to use with your app)

提交回复
热议问题