# \[Solved\]Android virtual device testing failed: (exit code: 1)

**URL:** <https://discuss.bitrise.io/t/solved-android-virtual-device-testing-failed-exit-code-1/9418>\
**Category:** Builds\
**Tags:** android\
**Created:** [June 26, 2019, 5:24am UTC](https://discuss.bitrise.io/t/solved-android-virtual-device-testing-failed-exit-code-1/9418 "2019-06-26T05:24:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dat](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/dat/32/2364_2.png) [@dat](https://discuss.bitrise.io/u/dat)\
**Post date:** [June 26, 2019, 5:24am UTC](https://discuss.bitrise.io/t/solved-android-virtual-device-testing-failed-exit-code-1/9418/1 "2019-06-26T05:24:36Z")

</div>

# Bitrise Build Issue Report template

## Description of the issue

virtual-device-testing-for-android@1.0.5 (exit code: 1)

When I manually testing on firebase by drag & drop APK & Test APK on same config on Firebase → UI test working normally (Running and have test report)

## Environment:

Ubuntu 16

If on [Bitrise.io](http://Bitrise.io): which stack? If not on [Bitrise.io](http://Bitrise.io): on what operating system? (Plus any other information you can share)

virtual-device-testing-for-android

E.g.: Git Clone v3.6.0

## Reproducibility

- _Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build)_ : NO
- _Does a rebuild without caches help? (You can remove the `Cache:Pull` and `Cache:Push` steps temporarily to not to use the cache, or [you can delete all the caches on the `Settings` tab of the app](http://devcenter.bitrise.io/caching/about-caching/#downloading-and-deleting-caches)._ : YES/NO
- _Does the issue happen sporadically, or every time?_ :
- _Does upgrading the build Step to the latest version help?_ : NO
- _When did the issue start?_ : from begining

### Local reproduction

_Can it be reproduced on your own Mac/PC by following our [local debug guide](http://discuss.bitrise.io/t/how-to-debug-your-build-locally-it-works-on-my-mac-pc-but-not-on-bitrise-io/392)? Please follow at least the first section (“Testing with a full clean git clone”) to make sure to test the state of the code what [bitrise.io](http://bitrise.io) will get when it does a git clone in the clean environment! If possible please note which sections you tried._ (not yet, I will try later)

### Local reproduction: Linux / Android (docker based) stack builds

_Can it be reproduced by running the build locally, after doing a new git clone of the repository into the `/tmp` directory and running the build from there with the Bitrise CLI ( [Bitrise CLI](https://www.bitrise.io/cli) )? If no, can it be reproduced with Docker (using the same docker images / environment we use on [bitrise.io](http://bitrise.io))? Related guide: [Running your build locally in Docker](http://devcenter.bitrise.io/docker/run-your-build-locally-in-docker/) ._

## Build log

> **[Log in - Bitrise](https://app.bitrise.io/users/sign_in)**
>
> Bringing back the joy of iOS & Android development through automating build, testing and support cycles.

Thanks

---

<div class="post-metadata">

**Author:** ![dat](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/dat/32/2364_2.png) [@dat](https://discuss.bitrise.io/u/dat)\
**Post date:** [June 27, 2019, 8:00am UTC](https://discuss.bitrise.io/t/solved-android-virtual-device-testing-failed-exit-code-1/9418/2 "2019-06-27T08:00:08Z")

</div>

I solved problem.In my case it using wrong Test APK by using TestAPK of lib  
Solution:

1. We should check from build logs to verify we are using correct APK and test APK:

`$BITRISE_TEST_APK_PATH, $BITRISE_APK_PATH`

1. Make sure _assembleDebugAndroidTest_ task generated expected Test APK, In my case I should use _assembleAndroidTest_ instead

That is it.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/bitrise/original/2X/d/d901cf2aad020f2dd11918afc89ec2089bb87b35.png) [@system](https://discuss.bitrise.io/u/system)\
**Post date:** [July 27, 2019, 8:00am UTC](https://discuss.bitrise.io/t/solved-android-virtual-device-testing-failed-exit-code-1/9418/3 "2019-07-27T08:00:08Z")

</div>

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