React Native android build failing on app:compileReleaseQaJavaWithJavac

#1

Bitrise Build Issue Report template

React native Android builds are failing because of a specific error.

Description of the issue

Here is the error we’re getting:

  • What went wrong:

Could not determine the dependencies of task ‘:app:compileReleaseQaJavaWithJavac’.

SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project’s local properties file at ‘/Users/vagrant/git/[REDACTED]/local.properties’.

  • Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

Environment:

Where did the issue happen?

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

Here’s the build that failed: https://app.bitrise.io/build/f2a47959c51bcac6#?tab=log

Which build Step causes the issue and which version of the step?

Step: android-build

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. : HAVEN’T TRIED

  • Does the issue happen sporadically, or every time? : EVERYTIME

  • Does upgrading the build Step to the latest version help? : NO

  • When did the issue start? : ABOUT A MONTH AGO

Local reproduction

Can it be reproduced on your own Mac/PC by following our local debug guide? 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 will get when it does a git clone in the clean environment! If possible please note which sections you tried. NOT REPRODUCIBLE LOCALLY

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 ( https://www.bitrise.io/cli )? If no, can it be reproduced with Docker (using the same docker images / environment we use on bitrise.io)? Related guide: http://devcenter.bitrise.io/docker/run-your-build-locally-in-docker/ .

Build log

See above.

Thank you!

0 Likes

#2

We already have the ANDROID_SDK_ROOT environment variable set up as: /usr/local/share/android-sdk

0 Likes

#3

We changed our underlying stack and added the missing components for android

0 Likes

#4

And yes, this fixed our issue here.

0 Likes