# How to resolve failed to find target with hash string 'android-25'?

**URL:** <https://discuss.circleci.com/t/how-to-resolve-failed-to-find-target-with-hash-string-android-25/23688>\
**Category:** Build Environment\
**Tags:** gradle, circle-yml, android\
**Created:** [July 18, 2018, 10:21pm UTC](https://discuss.circleci.com/t/how-to-resolve-failed-to-find-target-with-hash-string-android-25/23688 "2018-07-18T22:21:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BrianJVarley](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/brianjvarley/32/11311_2.png) [@BrianJVarley](https://discuss.circleci.com/u/BrianJVarley)\
**Post date:** [July 18, 2018, 10:21pm UTC](https://discuss.circleci.com/t/how-to-resolve-failed-to-find-target-with-hash-string-android-25/23688/1 "2018-07-18T22:21:05Z")

</div>

Hey

I’m opening an issue similar to this with my android build:

> [@Android sdk 23 not found](https://discuss.circleci.com/t/android-sdk-23-not-found/714):
>
> My Android build is failing with the following stacktrace: \* What went wrong: A problem occurred configuring project ':module'. \> Failed to notify project evaluation listener. \> failed to find target android-23 : /usr/local/android-sdk-linux \> failed to find target android-23 : /usr/local/android-sdk-linux \* Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED export TERM="dumb" if [-e ./gradlew]; then ./gra…

When I run the circlci build, the android job fails at step `gradlew assembleRelease -p ` with error:

> A problem occurred configuring project ‘:react-native-localization’.  
> failed to find target with hash string ‘android-25’ in: /opt/android/sdk

I did try to remedy this by using the node image - ` circleci/android:api-25-node8-alpha` but then I get the same error but instead for version `android 23` as another  
module requires this api version.

This gradle command works fine on my local just not on my circleci android build.

Any help with this issue would be great 🙂

GIst of android job:

```
   android:
    working_directory: ~/repo/android
    docker:
      - image: circleci/android:api-23-node8-alpha
    steps:
      - checkout:
          path: ~/repo
      - attach_workspace:
          at: ~/repo
      - run: echo 'export TERM=xterm' >> $BASH_ENV
      - run: echo y | android update sdk --no-ui --all --filter "tools"
      - run: echo y | android update sdk --no-ui --all --filter "build-tools-23.0.2"
      - run: echo y | android update sdk --no-ui --all --filter "build-tools-23.0.1"
      - run: echo y | android update sdk --no-ui --all --filter "build-tools-25.0.0"
      - run: sudo chmod +x ./gradlew
      #- run: ./gradlew clean
      - run: bundle install 
      - run: bundle exec fastlane beta 
      - store_artifacts:
          path: app/build/outputs/apk
          destination: apk

```

Link to my public build file:

[https://github.com/BrianJVarley/react-native-prototyping/blob/feature-localisation/.circleci/config.yml](https://github.com/BrianJVarley/react-native-prototyping/blob/feature-localisation/.circleci/config.yml)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [October 16, 2018, 10:21pm UTC](https://discuss.circleci.com/t/how-to-resolve-failed-to-find-target-with-hash-string-android-25/23688/2 "2018-10-16T22:21:05Z")

</div>

Closed on October 16, 2018, 10:21pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
