setup-android
setup-android copied to clipboard
SDK location not found
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'.
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.
Hello Lukasz,
We do actually export the ANDROID_HOME env var.
core.exportVariable('ANDROID_HOME', ANDROID_SDK_ROOT)
Could it be that act isn't picking it up somewhy?
Could it be that the installation did not complete fully? e.g. due to https://github.com/android-actions/setup-android/issues/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.