Skip to content

SDK location not found #362

Open
Open

Description

@lukasz-kalnik-gcx

I'm using https://github.com/nektos/act and Docker Desktop for Mac to run GitHub Actions locally.
I added the setup-android@v2.0.10 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'.

Activity

  1. lukasz-kalnik-gcx commented on Oct 26, 2022

    @lukasz-kalnik-gcx
    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.

  2. ViliusSutkus89 commented on Sep 25, 2023

    @ViliusSutkus89
    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?

  3. TWiStErRob commented on Nov 21, 2023

    @TWiStErRob
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions