Skip to content
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

SDK location not found #362

Open
lukasz-kalnik-gcx opened this issue Oct 26, 2022 · 3 comments
Open

SDK location not found #362

lukasz-kalnik-gcx opened this issue Oct 26, 2022 · 3 comments

Comments

@lukasz-kalnik-gcx
Copy link

I'm using https://github.com/nektos/act and Docker Desktop for Mac to run GitHub Actions locally.
I added the [email protected] action to my workflow.
It installs the Android SDK and accepts the licenses, however then the build fails with the exception:

> 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 '(...)local.properties'.
@lukasz-kalnik-gcx
Copy link
Author

Ok, I worked around this by manually setting the environment variable in an .env file like this:

ANDROID_HOME=/root/.android/sdk

Then I passed the .env file to act runner like this:

act --env-file .env

However, it would be a really nice improvement if the setup-android action would set the ANDROID_HOME environment variable automatically.

@ViliusSutkus89
Copy link
Collaborator

Hello Lukasz,

We do actually export the ANDROID_HOME env var.

main.ts:

core.exportVariable('ANDROID_HOME', ANDROID_SDK_ROOT)

Could it be that act isn't picking it up somewhy?

@TWiStErRob
Copy link

Could it be that the installation did not complete fully? e.g. due to #283. Are you sure that the first error in the logs, @lukasz-kalnik-gcx?

I had some partial success with echo '--container-architecture linux/amd64' >> .actrc, see warning.

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

No branches or pull requests

3 participants