# Android apk not being found anymore

**URL:** <https://discuss.bitrise.io/t/android-apk-not-being-found-anymore/484>\
**Category:** Question & Answer\
**Created:** [January 27, 2017, 3:46pm UTC](https://discuss.bitrise.io/t/android-apk-not-being-found-anymore/484 "2017-01-27T15:46:56Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![fmiralles](https://avatars.discourse-cdn.com/v4/letter/f/7ea924/32.png) [@fmiralles](https://discuss.bitrise.io/u/fmiralles)\
**Post date:** [January 27, 2017, 3:46pm UTC](https://discuss.bitrise.io/t/android-apk-not-being-found-anymore/484/1 "2017-01-27T15:46:56Z")

</div>

Suddenly apk generated files are not being found during a successful gradle-runner step (version: 1.5.3):

```
ApkFileIncludeFilter: app-stage-release.apk
ApkFileExcludeFilter: *-unaligned.apk
MappingFileIncludeFilter: */mapping.txt
MappingFileExcludeFilter: 
DeployDir: /bitrise/deploy

BUILD SUCCESSFUL

Total time: 1 mins 38.999 secs

Move apk files...
  find "." "-path" "app-stage-release.apk" "!" "-path" "*-unaligned.apk"
No apk matched the filters

Move mapping files...
  find "." "-path" "*/mapping.txt" "!" "-path" ""
  No mapping file matched the filters

```

Any idea what could be going wrong?

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [January 27, 2017, 3:55pm UTC](https://discuss.bitrise.io/t/android-apk-not-being-found-anymore/484/2 "2017-01-27T15:55:51Z")

</div>

Hi @fmiralles,

Thanks for asking this question here!

Did you change your Gradle configs, related to the APK’s name? It seems that you did set a filter to only copy/deploy `app-stage-release.apk`, but this Gradle step no longer generates an APK with that file name.

If you want to copy/deploy a single APK, you have to specify the APK’s file name in the **Gradle Runner** step’s **APK file include filter** input/option (the APK’s file name which will be generated by the gradle task you specified for the **Gradle Runner** step).

If you want to copy/deploy all generated APK files, you can use a wildcard filter like: `*.apk`

Let us know if you’d have any questions!

---

<div class="post-metadata">

**Author:** ![fmiralles](https://avatars.discourse-cdn.com/v4/letter/f/7ea924/32.png) [@fmiralles](https://discuss.bitrise.io/u/fmiralles)\
**Post date:** [January 27, 2017, 3:58pm UTC](https://discuss.bitrise.io/t/android-apk-not-being-found-anymore/484/3 "2017-01-27T15:58:18Z")

</div>

It’s already specified. Check the pre-formatted attached lines…  
 ![](https://us1.discourse-cdn.com/flex016/uploads/bitrise/original/1X/305fd02af8b78a38ef98ad232a64addc975e6a43.png)

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [January 27, 2017, 4:05pm UTC](https://discuss.bitrise.io/t/android-apk-not-being-found-anymore/484/4 "2017-01-27T16:05:47Z")

</div>

> [@fmiralles](#):
>
> It’s already specified.

That’s exactly what I meant, that you specified a filter `app-stage-release.apk`, but your Gradle task does not generate an APK with that file name (`app-stage-release.apk`).

You should check what’s the generated APK’s file name is, and set that as the include filter.

---

<div class="post-metadata">

**Author:** ![fmiralles](https://avatars.discourse-cdn.com/v4/letter/f/7ea924/32.png) [@fmiralles](https://discuss.bitrise.io/u/fmiralles)\
**Post date:** [January 27, 2017, 4:22pm UTC](https://discuss.bitrise.io/t/android-apk-not-being-found-anymore/484/5 "2017-01-27T16:22:50Z")

</div>

Checking btirise logs looks it’s the right name: _ **/bitrise/src/app/build/outputs/apk/app-stage-release.apk** _  
I did also check locally and it’s indeed the file being generated: **_app-stage-release.apk_**

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [January 27, 2017, 4:42pm UTC](https://discuss.bitrise.io/t/android-apk-not-being-found-anymore/484/6 "2017-01-27T16:42:54Z")

</div>

Ohh, it might actually be related to the latest Gradle Runner version’s change: [https://github.com/bitrise-io/steps-gradle-runner/releases/tag/1.5.3](https://github.com/bitrise-io/steps-gradle-runner/releases/tag/1.5.3)

Can you please try it with v1.5.2 of the Gradle Runner step?

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [January 27, 2017, 4:51pm UTC](https://discuss.bitrise.io/t/android-apk-not-being-found-anymore/484/7 "2017-01-27T16:51:31Z")

</div>

OK, we found the issue and it’s indeed related to the new **Gradle Runner** step version. Fortunately the issue is really simple to fix: just add a `*` prefix to the filter.

E.g. instead of:

```auto
app-stage-release.apk

```

use:

```auto
*app-stage-release.apk

```

or

```auto
*/app-stage-release.apk

```

Basically the change was that the filter is no longer applied on the file name, but instead on the **path** , so if you specify an exact value without `*` then the full path have to match that. The advantage of the new filter method is that you can now filter by the path too, and not just by the apk’s name. E.g. previously this wasn’t possible: `*/apk/release/*.apk` but now it is!

---

<div class="post-metadata">

**Author:** ![fmiralles](https://avatars.discourse-cdn.com/v4/letter/f/7ea924/32.png) [@fmiralles](https://discuss.bitrise.io/u/fmiralles)\
**Post date:** [January 27, 2017, 5:01pm UTC](https://discuss.bitrise.io/t/android-apk-not-being-found-anymore/484/8 "2017-01-27T17:01:25Z")

</div>

As you said it does works on Gradle v1.5.2.

Understood…

Thanks Viktor!

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [January 27, 2017, 5:09pm UTC](https://discuss.bitrise.io/t/android-apk-not-being-found-anymore/484/9 "2017-01-27T17:09:34Z")

</div>

We published a #Changelog for this - you can find more info about how you can use v1.5.3

> [@Gradle Runner v1.5.3 - change in filter input!](http://discuss.bitrise.io/t/gradle-runner-v1-5-3-change-in-filter-input/487):
>
> Gradle Runner v1.5.3 was just released and it changed how the include and exclude filters works; instead of a file name filter it uses a path filter now. If you used a wildcard prefixed pattern before, like \*.apk, this should not affect you at all, but if you previously used a full file name like app1.apk you should change the pattern to \*/app1.apk, or specify the full path (can be relative, e.g. ./app/build/outputs/apk/app1.apk or \*/app/build/outputs/apk/app1.apk) or part of the path with a wi…

TL;DR; you just have to prefix the file name with `*` or `*/`, as I mentioned [above](http://discuss.bitrise.io/t/android-apk-not-being-found-anymore/484/7).

---

<div class="post-metadata">

**Author:** ![fouedj](https://avatars.discourse-cdn.com/v4/letter/f/c77e96/32.png) [@fouedj](https://discuss.bitrise.io/u/fouedj)\
**Post date:** [February 23, 2023, 1:33pm UTC](https://discuss.bitrise.io/t/android-apk-not-being-found-anymore/484/10 "2023-02-23T13:33:46Z")

</div>

Me too i have react-native project and i want to build it android side “apk” i’m doing this workflow:

- Activate SSH key. ✅
- Git Clone Repository. checked
- Run npm commande (npm install). ✅
- Run npm commande (run “cd android && ./gradlew assembleRelease”) =\> to generate apk ✅
- Deploy to Bitrise Build ✅
- Firebase App Distribution 🚫  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/bitrise/original/2X/1/16903806aa2911e9e93c24fe8420d2fa19c89276.png)  
please i need help
