failed to find target with hash string android-23

后端 未结 20 2928
梦如初夏
梦如初夏 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 17:00

    Had the same issue with another number, this worked for me:

    1. Click the error message at top "Gradle project sync failed" where the text says ´Open message view´

    2. In the "Message Gradle Sync" window on the bottom left corner, click the provided solution "Install missing ... "

    3. 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

    0 讨论(0)
  • 2020-12-02 17:00

    AndroidSDK > SDK platforms > and install API Level 23

    0 讨论(0)
  • 2020-12-02 17:03

    In Android Studio File -> Invalidate Caches/Restart solved the issue for me.

    0 讨论(0)
  • 2020-12-02 17:04

    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.

    0 讨论(0)
  • 2020-12-02 17:04

    Download the specific Android release from the link specified in the build console.

    0 讨论(0)
  • 2020-12-02 17:07

    Note: I think this might be a bug in Android Studio.

    1. Go to Project Structure
    2. Select App Module
    3. Under the first tab "Properties" change the Compile SDK Version to API XX from Google API xx (e.g. API 23 instead of Google API 23)
    4. Press OK
    5. Wait for the completion of on going process, in my case I did not get an error at this point.

    Now revert Compiled Sdk Version back to Google API xx.

    If this not work, then:

    1. With Google API (Google API xx instead of API xx), lower the build tool version (e.g. Google API 23 and build tool version 23.0.1)
    2. Press Ok and wait for completion of on going process
    3. Revert back your build tool version to what it was before you changed
    4. Press Ok
    5. Wait for the completion of process.
    6. Done!
    0 讨论(0)
提交回复
热议问题