Android build issue regarding Gradlew Tasks

Bitrise Build Issue Report template

Description of the issue

I recently updated my RN app from 0.59.X to 0.62.2. Got everything running locally and am able to build by running cd android and then ./gradlew app:assembleRelease. One odd thing about running it locally, if I try ./android/gradlew app:assembleRelease it doesnt work, giving the error project 'app' not found in root project 'XXXXXX'.

With that said when I run ./gradlew tasks locally I donā€™t see assembleRelease in the list of tasks yet it works when I run itā€¦

Either way, I am trying to now get this running on bitrise but am running into similar issues. I have tried both the Android Build step and the Gradle Runner with no luck.

When running the Android Build app:assembleRelease I get the error Failed to find buildable variants, error: variant: assembleRelease not found in any module.

So in a previous script step I added ./android/gradlew tasks to view my tasks and they do not match my local tasks and are very limited:


Tasks runnable from root project


Build Setup tasks


init - Initializes a new Gradle build.

wrapper - Generates Gradle wrapper files.

Help tasks


buildEnvironment - Displays all buildscript dependencies declared in root project ā€˜gitā€™.

components - Displays the components produced by root project ā€˜gitā€™. [incubating]

dependencies - Displays all dependencies declared in root project ā€˜gitā€™.

dependencyInsight - Displays the insight into a specific dependency in root project ā€˜gitā€™.

dependentComponents - Displays the dependent components of components in root project ā€˜gitā€™. [incubating]

help - Displays a help message.

model - Displays the configuration model of root project ā€˜gitā€™. [incubating]

outgoingVariants - Displays the outgoing variants of root project ā€˜gitā€™.

projects - Displays the sub-projects of root project ā€˜gitā€™.

properties - Displays the properties of root project ā€˜gitā€™.

tasks - Displays the tasks runnable from root project ā€˜gitā€™.

So not exactly sure where iā€™m going wrong with gradle but looking for any adviceā€¦

Environment:

Happens on Bitrise XCode 11.5.X on MacOS 10.15.4 Catalina

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

Android Build 0.10.1

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) : YES
  • Does the issue happen sporadically, or every time? : Every time
  • Does upgrading the build Step to the latest version help? : NO
  • When did the issue start? : After updating RN

Build log

Hi @walkaboutsupport!

Sorry about the delay! Are you sure your module is called assembleRelease? What happened when you used the Gradle Runner to run that task, can you include a build URL about that?

Iā€™m not 100% sure how React Native handles this, but the default variant should be simply release, and assembleRelease is a the Gradle command used to build the release variant.

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