Giter Site home page Giter Site logo

Comments (6)

vgaidarji avatar vgaidarji commented on June 3, 2024

@noloman hey. are you working on an open source project? if yes, could you please share a link to repository and failed actions build?

JAVA_HOME is set here https://github.com/vgaidarji/docker-android/blob/570d8f3aacd6af72b817254d08c99cd5bae57636/docker-android-build/Dockerfile#L5-L6
Not sure yet why it tells you that it is set to invalid directory /opt/hostedtoolcache/Java/8.0.222/x64.

from android-github-actions.

noloman avatar noloman commented on June 3, 2024

@noloman hey. are you working on an open source project? if yes, could you please share a link to repository and failed actions build?

JAVA_HOME is set here vgaidarji/docker-android:docker-android-build/Dockerfile@570d8f3#L5-L6
Not sure yet why it tells you that it is set to invalid directory /opt/hostedtoolcache/Java/8.0.222/x64.

Hi, I'm using it in https://github.com/noloman/MoneyTransactions. Maybe it's because I'm setting it up wrong?

from android-github-actions.

vgaidarji avatar vgaidarji commented on June 3, 2024

@noloman I would advise you to get rid of set up JDK 1.8 step which actions/setup-java@v1 https://github.com/noloman/MoneyTransactions/blob/a296219512e96d68d9ddc57065d9d9f1ae5afe99/.github/workflows/android.yml#L15

And then use another action for running other Gradle tasks

    - name: Build with Gradle
      run: ./gradlew build --stacktrace
      uses: vgaidarji/android-github-actions/[email protected]

Here's sample workflow I used to showcase GitHub Actions for Android project configuration - https://raw.githubusercontent.com/vgaidarji/ci-matters/master/.github/main.workflow.

from android-github-actions.

mohsenoid avatar mohsenoid commented on June 3, 2024

I am facing the same issue,

ERROR: JAVA_HOME is set to an invalid directory: /opt/hostedtoolcache/Java/8.0.232/x64

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.

Whole CI tasks and Android build works fine, but the moment I add the emulator it stopped working.

from android-github-actions.

belafarinrod avatar belafarinrod commented on June 3, 2024

Hey,
I faced the same issue and tried to go with your workaround (replacing the jdk8-setup with your build step).
This is my yml-file:

  steps:
    - uses: actions/checkout@v2
    - name: "Build"
      uses: vgaidarji/android-github-actions/[email protected]
    - name: "Run UI Tests"
      uses: vgaidarji/[email protected]

Running the UI Tests fails:

/usr/bin/docker run --name d34243f0f986dd4a1c85843aeaf21cb61c_f345ca --label 3888d3 --workdir /github/workspace --rm -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/LazyAss/LazyAss":"/github/workspace" 3888d3:4243f0f986dd4a1c85843aeaf21cb61c
*************************************************************************
The "android" command is deprecated.
For manual SDK, AVD, and project management, please use Android Studio.
For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager
*************************************************************************
Running /opt/android-sdk/tools/bin/avdmanager create avd --force -n test -t android-21 --abi default/armeabi-v7a

Error: Flag '-t' is not valid for 'create avd'.

Usage:
      avdmanager [global options] create avd [action options]
      Global options:
  -s --silent     : Silent mode, shows errors only.
  -v --verbose    : Verbose mode, shows errors, warnings and all messages.
     --clear-cache: Clear the SDK Manager repository manifest cache.
  -h --help       : Help on a specific command.

Action "create avd":
  Creates a new Android Virtual Device.
Options:
  -a --snapshot: Place a snapshots file in the AVD, to enable persistence.

This is the failing check:
https://github.com/belafarinrod/LazyAss/pull/18/checks?check_run_id=725588657

from android-github-actions.

vgaidarji avatar vgaidarji commented on June 3, 2024

@belafarinrod hey. The issue you're facing has no resolution yet and is tracked under vgaidarji/docker-android#11. You could try using alternative action in the meantime which uses mac-os runner instead of ubuntu where emulator is working.
I did the same in here.
Until google/android-emulator-container-scripts#21 is solved, Android emulator action on Ubuntu won't work.

from android-github-actions.

Related Issues (7)

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.