Skip to content

Add setup-android step #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tcK1
Copy link

@tcK1 tcK1 commented Jul 14, 2025

Thanks for the RNEF suite, it's amazing!

We've come though this issue when using our self-hosted runner, which does not come with the pre-installed android tools.

Resultiing in the following error:

◇  Failed to build the app
│
■  * Where:
│  Build file '/home/runner/_work/my-app/my-app/android/build.gradle' line: 80
│  
│  * What went wrong:
│  A problem occurred evaluating root project 'gympass'.
│  > Failed to apply plugin 'com.facebook.react.rootproject'.
│     > A problem occurred configuring project ':app'.
│        > SDK location not found. Define a valid SDK location with an ANDROID_HOME environment variable or by setting the sdk.dir path in your project's local properties file at '/home/runner/_work/my-app/my-app/android/local.properties'.

■  RnefError: Failed to build the app. See the error above for details from Gradle.
│      at runGradle (file:///home/runner/_work/my-app/my-app/node_modules/@rnef/platform-android/dist/src/lib/commands/runGradle.js:47:15)
│      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
│      at async buildAndroid (file:///home/runner/_work/my-app/my-app/node_modules/@rnef/platform-android/dist/src/lib/commands/buildAndroid/buildAndroid.js:17:5)
│      at async Object.action (file:///home/runner/_work/my-app/my-app/node_modules/@rnef/platform-android/dist/src/lib/commands/buildAndroid/command.js:9:13)
│      at async Command.<anonymous> (file:///home/runner/_work/my-app/my-app/node_modules/@rnef/cli/dist/src/lib/cli.js:39:17)
│      at async Command.parseAsync (/home/runner/_work/my-app/my-app/node_modules/commander/lib/command.js:1092:5)
│      at async cli (file:///home/runner/_work/my-app/my-app/node_modules/@rnef/cli/dist/src/lib/cli.js:74:5) {
│    [cause]: undefined
│  }
Error: Process completed with exit code 1.

To "solve" this issue, we've manually added the actions/setup-java and android-actions/setup-android (we can't add only the setup-android one since it depends on the Java installation) on our workflow, but that's a bit problematic, since callstackincubator/android also calls actions/setup-java, we end up with two post-install jobs and caches.

This PR add's the android-actions/setup-android action directly under the callstackincubator/android action, just like actions/setup-java.

Copy link

changeset-bot bot commented Jul 14, 2025

⚠️ No Changeset found

Latest commit: e73e23d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@thymikee
Copy link
Contributor

Thanks for that! I'm hesitant adding a new action to that job. Instead, I've made the actions/setup-java action conditional (enabled by default) here: #8 so you can disable it and run both actions before this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants