GithubHelp home page GithubHelp logo

android-actions / setup-android Goto Github PK

View Code? Open in Web Editor NEW
171.0 4.0 62.0 2 MB

Android SDK setup for GitHub Actions

License: MIT License

TypeScript 84.25% JavaScript 15.75%
sdkmanager setup-android android-sdk

setup-android's Introduction

setup-android

Build & Test

This action sets up the Android SDK tools by:

  • Downloading the SDK commandline tools, if the current version (11.0) is not found in either $ANDROID_SDK_ROOT or $HOME/.android/sdk.
  • Accepting the SDK licenses.
  • Installing tools and platform-tools.
  • Adding platform-tools (contains adb) and cmdline-tools/11.0/bin (contains sdkmanager) to $PATH.
  • Setting up problem matchers.

On Windows 2016 runners, this action also checks if $ANDROID_SDK_ROOT path contains spaces. If it does - it moves SDK to a path without spaces. This is needed because spaces are highly problematic:

C:\windows\system32\cmd.exe /D /S /C ""C:\Program Files (x86)\Android\android-sdk\cmdline-tools\3.0\bin\sdkmanager.bat" --licenses"
Error: Could not find or load main class Files

Usage

See action.yml

Basic

steps:
- uses: actions/checkout@v4

- name: Set up JDK 17
  uses: actions/setup-java@v3
  with:
    java-version: '17'
    distribution: 'temurin'

- name: Setup Android SDK
  uses: android-actions/setup-android@v3

- name: Build SampleApplication
  run: ./gradlew --no-daemon build

Additional packages

Input parameter packages controls which packages this action will install from Android SDK.

Default value is tools platform-tools, supply an empty string to skip installing additional packages.

Additional packages can be installed at a later time by calling sdkmanager manually.

- name: Setup Android SDK
  uses: android-actions/setup-android@v3
  with:
    packages: ''

# ...

- run: sdkmanager tools platform-tools

SDK Version selection

Command line tools are versioned using two variables - short and long. Long one is the build number, used in the zip URL, short one is the human friendly version name.

By default, setup-android installs version 10406996 (short version 11.0).

To install a different version, call setup-android with desired long version as the input parameter cmdline-tools-version:

- name: Setup Android SDK
  uses: android-actions/setup-android@v3
  with:
    cmdline-tools-version: 8512546

Version table

Short version Long version
11.0 10406996
10.0 9862592
9.0 9477386
8.0 9123335
7.0 8512546

Current cmdline tools version can be found at https://developer.android.com/studio#command-line-tools-only

Android SDK Licenses

Android SDK is not public domain software, it comes with a license.

Input parameter accept-android-sdk-licenses decides if Android SDK licenses should be agreed to on behalf of the user of this action. Default option is 'yes', because otherwise SDK is unusable until said licenses are agreed to.

licenses are quite long, to prevent a wall of text in the action output, licenses can be agreed to silently. Input parameter log-accepted-android-sdk-licenses controls whether license texts should be printed or omitted from the text output. Defaults to 'true'.

Thanks

Based on the project android-problem-matchers-action from @jonasb

setup-android's People

Contributors

acecoderlaura avatar daveol avatar denubis avatar dependabot[bot] avatar jonasb avatar mikehardy avatar navarroaxel avatar omarshehata avatar simonmarquis avatar viliussutkus89 avatar xom9ikk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

setup-android's Issues

Access build-tools

I'd like to use apksigner, which is in the build-tools folder. How can I do this?

Failed to find target with hash string 'android-26'

I've set up this action a few months ago, but since then I started getting failures this month.

You can see the build history at https://github.com/TWiStErRob/net.twisterrob.gradle/actions/workflows/CI.yml
You can see that June 8, 9, 14 on master all had green builds, for example:
The latest one: https://github.com/TWiStErRob/net.twisterrob.gradle/runs/2815492988
But in July most builds fail when trying to use android-26, for example:
https://github.com/TWiStErRob/net.twisterrob.gradle/runs/3085771486

Somehow I got a success on private_junit5 branch, so this might be an intermittent issue, but seems very frequent so far.

Can you please advise how to investigate what's wrong. The logs suggest that all should be fine with install:

> Configure project :instant
Observed package id 'ndk;21.4.7075529' in inconsistent location '/usr/local/lib/android/sdk/ndk-bundle' (Expected '/usr/local/lib/android/sdk/ndk/21.4.7075529')
File /home/runner/.android/repositories.cfg could not be loaded.
Checking the license for package Android SDK Platform 26 in /usr/local/lib/android/sdk/licenses
License for package Android SDK Platform 26 accepted.
Preparing "Install Android SDK Platform 26 (revision: 2)".
"Install Android SDK Platform 26 (revision: 2)" ready.
Installing Android SDK Platform 26 in /usr/local/lib/android/sdk/platforms/android-26
"Install Android SDK Platform 26 (revision: 2)" complete.
"Install Android SDK Platform 26 (revision: 2)" finished.
Observed package id 'ndk;21.4.7075529' in inconsistent location '/usr/local/lib/android/sdk/ndk-bundle' (Expected '/usr/local/lib/android/sdk/ndk/21.4.7075529')
Build properties not found for package Android SDK Platform 26

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':instant'.
> Failed to find target with hash string 'android-26' in: /usr/local/lib/android/sdk

Error on Expand

Hello, I'm unable to run this action on self hosted windows, get this message every time and can't figure out why. Somebody knows about ?

image

Quoting the license text in CI logs

Is it a requirement somewhere that the actual license text is quoted in the logs every single time the licenses are accepted? We have a job with 20+ parallel flavours, and this adds almost 800 lines of boilerplate in the logs, for every single flavour on every single run. Not an error, but it seems excessive and these logs go to storage and add cost.

Sporadic Failures

Sometimes I am seeing the following error, sometimes not. I believe this happens when I am running multiple steps in parallel. How would I go about fixing this?

Run android-actions/setup-android@v[2](https://github.com/ShareTheMeal/app-android/runs/5864050026?check_suite_focus=true#step:4:2)
  env:
    JAVA_HOME: /home/actions-runner/_work/_tool/Java_Zulu_jdk/11.0.14-9/x64
(node:[3](https://github.com/ShareTheMeal/app-android/runs/5864050026?check_suite_focus=true#step:4:3)061[4](https://github.com/ShareTheMeal/app-android/runs/5864050026?check_suite_focus=true#step:4:4)) UnhandledPromiseRejectionWarning: Error: Unable to locate executable file: unzip. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.
    at Object.<anonymous> (/home/actions-runner/_work/_actions/android-actions/setup-android/v2/dist/index.js:2117:27)
    at Generator.next (<anonymous>)
    at fulfilled (/home/actions-runner/_work/_actions/android-actions/setup-android/v2/dist/index.js:1942:[5](https://github.com/ShareTheMeal/app-android/runs/5864050026?check_suite_focus=true#step:4:5)8)
(node:30[6](https://github.com/ShareTheMeal/app-android/runs/5864050026?check_suite_focus=true#step:4:6)14) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:30614) [DEP001[8](https://github.com/ShareTheMeal/app-android/runs/5864050026?check_suite_focus=true#step:4:8)] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Also it looks like this action is not terminating correctly so it looks like the steps after this one fail.

Screenshot 2022-04-07 at 09 20 42

UnsupportedClassVersionError: AndroidLocationsProvider (class file version 55.0)

Hi, I started sporadically getting this error yesteday:

Run android-actions/setup-android@v2
  env:
    JOB_NAME: AGP 3.5.x on Gradle 6.x (3.5.4) on 6.7.1)
    GRADLE_VERSION: 0.0.0
    JAVA8_HOME: /usr/lib/jvm/temurin-8-jdk-amd64
    JAVA11_HOME: /usr/lib/jvm/temurin-11-jdk-amd64
    JAVA_HOME: /usr/lib/jvm/temurin-8-jdk-amd64
/usr/local/lib/android/sdk/cmdline-tools/latest/bin/sdkmanager cmdline-tools;7.0
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/android/prefs/AndroidLocationsProvider has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
	at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
	at java.lang.Class.getMethod0(Class.java:3018)
	at java.lang.Class.getMethod(Class.java:1784)
	at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:650)
	at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:632)
/home/runner/work/_actions/android-actions/setup-android/v2/dist/index.js:2348
                error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);
                        ^

Error: The process '/usr/local/lib/android/sdk/cmdline-tools/latest/bin/sdkmanager' failed with exit code 1
    at ExecState._setResult (/home/runner/work/_actions/android-actions/setup-android/v2/dist/index.js:2348:25)
    at ExecState.CheckComplete (/home/runner/work/_actions/android-actions/setup-android/v2/dist/index.js:2331:18)
    at ChildProcess.<anonymous> (/home/runner/work/_actions/android-actions/setup-android/v2/dist/index.js:2225:27)
    at ChildProcess.emit (node:events:527:28)
    at maybeClose (node:internal/child_process:1092:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)

It happens randomly. I have a big matrix 38 jobs, 23 of them use Java 8, and 2-3 of them randomly chosen of the 23 fail with the above.

My guess is that cmdline-tools:latest was just released with a requirement on Java 11. And this setup-android action is just showing the problem, not causing it. Reported here anyway just in case you know anything, and others are looking at the same problem.

Example fail: https://github.com/TWiStErRob/net.twisterrob.gradle/actions/runs/3939418181/jobs/6862851517
(Note that it is Attempt 2, because the original Attempt 1 execution didn't fail, and because it's on master nothing has changed since Attempt 1 in my code.)

The only other reference to this I found: https://ask.csdn.net/questions/7878632

Deprecated GitHub actions usage

Action Failed

I added this action to my workflow but it seems to have failed. Here's the log from the Actions run:

Run android-actions/setup-android@v2
  env:
    BUILD_CONFIGURATION: Release
    SOLUTION_FILE_PATH: src\Adapt.Presentation.XamarinForms.sln
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; [System.IO.Compression.ZipFile]::ExtractToDirectory('C:\actions-runner\_work\_temp\1a1339f9-26c7-4f5f-b738-0c7d74ff2dc8', 'C:\actions-runner\_work\_temp\903f36fd-72ff-4212-8fd9-291663a9a96e')"
(node:7968) UnhandledPromiseRejectionWarning: Error: Unable to locate executable file: C:\actions-runner\_work\_temp\903f36fd-72ff-4212-8fd9-291663a9a96e\tools\bin\sdkmanager.bat. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.
    at Object.<anonymous> (C:\actions-runner\_work\_actions\android-actions\setup-android\v2\dist\index.js:1:2585)
    at Generator.next (<anonymous>)
    at fulfilled (C:\actions-runner\_work\_actions\android-actions\setup-android\v2\dist\index.js:1:601)
(node:7968) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:7968) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Error installing 'patcher;v4

I'm using version @v2 with cmdline-tools;7.0.
When I start the setup, I run sdkmanager --list_installed and 'patcher;v4' is not shown.
Running the command sdkmanager --install "patcher;v4", an error appears (Warning: Failed to find package 'patcher;v4') and the action stops.

Does anyone know or have experienced this?

Expand-Archive Fails

After updating the action version from 2.0.7 to 2.0.10 I get this error when running my build:

C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath 'C:\actions-runner\_work\_temp\728e1df8-2583-4a31-b353-58244a48fb67' -DestinationPath 'C:\actions-runner\_work\_temp\de2e8fc6-b438-4830-8347-350bc9fcbeec' -Force } else {[System.IO.Compression.ZipFile]::ExtractToDirectory('C:\actions-runner\_work\_temp\728e1df8-2583-4a31-b353-58244a48fb67', 'C:\actions-runner\_work\_temp\de2e8fc6-b438-4830-8347-350bc9fcbeec', $true) }"
Expand-Archive :  is not a supported archive file format. .zip is the only supported archive file format.
At line:1 char:210
+ ...  Ignore)) { Expand-Archive -LiteralPath 'C:\actions-runner\_work\_tem ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:String) [Expand-Archive], IOException
    + FullyQualifiedErrorId : NotSupportedArchiveFileExtension,Expand-Archive
 
C:\actions-runner\_work\_actions\android-actions\setup-android\v2.0.10\dist\index.js:2348
                error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);
                        ^

Error: The process 'C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe' failed with exit code 1
    at ExecState._setResult (C:\actions-runner\_work\_actions\android-actions\setup-android\v2.0.10\dist\index.js:2348:25)
    at ExecState.CheckComplete (C:\actions-runner\_work\_actions\android-actions\setup-android\v2.0.10\dist\index.js:2331:18)
    at ChildProcess.<anonymous> (C:\actions-runner\_work\_actions\android-actions\setup-android\v2.0.10\dist\index.js:2225:27)
    at ChildProcess.emit (node:events:390:28)
    at maybeClose (node:internal/child_process:1064:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)

The YAML for this step is as follows:

      - name: Setup Android SDK
        uses: android-actions/[email protected]

The runner is self-hosted on Microsoft Windows Server 2019 Datacenter.

Missing versions on GitHub marketplace

As pointed out in #355 (comment) there are many missing versions:

Marketplace Releases
image image

I think the missing piece is pressing this checkbox when releasing. This is probably doable just by editing the past releases to bump them into the marketplace too.

image

Has this been tried on arm64 runners?

I am trying to use this package to set up self-hosted runners on arm64 AWS instances.

I get the following error and the setup-android step ends after the following:

[===                                    ] 10% Computing updates...              
[845](https://github.com/my-hotfix-module/runs/6230451597?check_suite_focus=true#step:6:845)
                                                                                
[846](https://github.com/my-hotfix-module/runs/6230451597?check_suite_focus=true#step:6:846)
Warning: Unable to compute a complete list of dependencies.
[847](https://github.com/my-hotfix-module/runs/6230451597?check_suite_focus=true#step:6:847)
(node:5271) UnhandledPromiseRejectionWarning: Error: The process '/home/ec2-user/.android/sdk/cmdline-tools/6.0/bin/sdkmanager' failed with exit code 1
[848](https://github.com/my-hotfix-module/runs/6230451597?check_suite_focus=true#step:6:848)
    at ExecState._setResult (/opt/actions-runner/_work/_actions/android-actions/setup-android/v2/dist/index.js:1307:25)
[849](https://github.com/my-hotfix-module/runs/6230451597?check_suite_focus=true#step:6:849)
    at ExecState.CheckComplete (/opt/actions-runner/_work/_actions/android-actions/setup-android/v2/dist/index.js:1290:18)
[850](https://github.com/my-hotfix-module/runs/6230451597?check_suite_focus=true#step:6:850)
    at ChildProcess.<anonymous> (/opt/actions-runner/_work/_actions/android-actions/setup-android/v2/dist/index.js:1184:27)
[851](https://github.com/my-hotfix-module/runs/6230451597?check_suite_focus=true#step:6:851)
    at ChildProcess.emit (events.js:314:20)
[852](https://github.com/my-hotfix-module/runs/6230451597?check_suite_focus=true#step:6:852)
    at maybeClose (internal/child_process.js:1022:16)
[853](https://github.com/my-hotfix-module/runs/6230451597?check_suite_focus=true#step:6:853)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
[854](https://github.com/my-hotfix-module/runs/6230451597?check_suite_focus=true#step:6:854)
(node:5271) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
[855](https://github.com/my-hotfix-module/runs/6230451597?check_suite_focus=true#step:6:855)
(node:5271) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[856](https://github.com/my-hotfix-module/runs/6230451597?check_suite_focus=true#step:6:856)
[===                                    ] 10% Computing updates...

and then later it appears the SDK is either not installed or the environment variables aren't configured, because I see:

Could not determine the dependencies of task ':my-hotfix-module:lintDebug'.
[306](https://github.com/my-hotfix-module/runs/6230451597?check_suite_focus=true#step:9:306)
> SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable

How can I confirm the SDK is installed, and if it is and I need to set the environment var myself, where is the SDK installed?

ndk-bundle disappeared (a good thing, but confusing)

Hi, I'm using your action for a while now, and it has always warned about ndk-bundle being in the wrong location. (e.g. you can see it here too #167)

I even tried different workarounds to silence the warning:

# Uninstall NDK, because it's not used and it emits a warning:
# > Warning: Observed package id 'ndk;21.4.7075529'
# > in inconsistent location '/usr/local/lib/android/sdk/ndk-bundle'
# > (Expected '/usr/local/lib/android/sdk/ndk/21.4.7075529')
echo sdkmanager --uninstall "ndk;21.4.7075529"
sdkmanager --uninstall "ndk;21.4.7075529"

then

# Remove ndk-bundle, because it's not used and it emits a warning:
# > Warning: Observed package id 'ndk;21.4.7075529'
# > in inconsistent location '/usr/local/lib/android/sdk/ndk-bundle'
# > (Expected '/usr/local/lib/android/sdk/ndk/21.4.7075529')
echo rm /usr/local/lib/android/sdk/ndk-bundle
rm /usr/local/lib/android/sdk/ndk-bundle

now, the weird thing is that recently it suddenly disappeared. 9 days ago (July 27) it was working (i.e. the folder was there and deleting it worked), but then July 29, and August 3 I had failing builds because it was unable to find this directory / symlink to delete.

So I just disabled this step and the warning seems to be gone:
image

Now, don't get me wrong, I like this state better, it's just curious that you didn't release a setup-android@v2 version around these dates (last release 2.0.8 on April 22, and tag v2 points to that commit too), yet the behavior changed, any idea why?

Warning on set-env depreciation

When running:

      - name: Setup Android SDK
        uses: android-actions/setup-android@v2

It returns:

Warning: The `set-env` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/

Feature Request: Specify SDK Version

const COMMANDLINE_TOOLS_VERSION = '6858069'

await callSdkManager(sdkManager, 'platform-tools')

I am in need of the Android 28-30 SDK.
It would be great if we could either specify a version to use or update the version to the latest.

✖ Cannot find a compatible Android SDK for compilation. To be able to build for Android, install Android SDK 28 or later. 
 Run `$ sdkmanager` to manage your Android SDK versions. 

✖ You need to have the Android SDK Build-tools installed on your system. You can install any version in the following range: '>=23 <=30'. 
 Run `$ sdkmanager` from your command-line to install required `Android Build Tools`. In case you already have them installed, make sure `ANDROID_HOME` environment variable is set correctly. 

Your environment is not configured properly and you will not be able to execute local builds. To continue, choose one of the following options: 
Run $ tns preview command to enjoy NativeScript without any local setup.
Run $ tns setup command to run the setup script to try to automatically configure your environment for local builds.
Verify that your environment is configured according to the system requirements described at https://docs.nativescript.org/start/general-requirements#full-setup-requirements-linux.

Tear Down Action

It would be nice if after the job was complete if the downloaded SDK would be automatically deleted.

Become GitHub partner organization to receive verified badge on the Marketplace

I'm getting the following error after triggering the workflow: runs on [self-hosted]

Error: .github#L1 android-actions/setup-android@v3 is not allowed to be used in repo/products. Actions in this workflow must be: within a repository that belongs to your Enterprise account, created by GitHub, verified in the GitHub Marketplace

Setup Android SDK fails

Hi,I am using self hosted runner (ubuntu) and I have added this action android-actions/setup-android@v2 but the build fails with this error message.

Run android-actions/setup-android@v2
/workdir/_actions/android-actions/setup-android/v2/dist/index.js:354[6](https://github.com/wtag/android-mobile-app/actions/runs/5043540154/jobs/9045450586#step:4:7)
                    throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);
                          ^

Error: Unable to locate executable file: unzip. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.
    at Object.<anonymous> (/workdir/_actions/android-actions/setup-android/v2/dist/index.js:3546:2[7](https://github.com/wtag/android-mobile-app/actions/runs/5043540154/jobs/9045450586#step:4:8))
    at Generator.next (<anonymous>)
    at fulfilled (/workdir/_actions/android-actions/setup-android/v2/dist/index.js:3357:5[8](https://github.com/wtag/android-mobile-app/actions/runs/5043540154/jobs/9045450586#step:4:9))

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'.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.