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

Cannot build from source #207

Open
xrviv opened this issue May 30, 2024 · 0 comments
Open

Cannot build from source #207

xrviv opened this issue May 30, 2024 · 0 comments

Comments

@xrviv
Copy link

xrviv commented May 30, 2024

Description

Encountering errors with building the app from source.

Version

4.0.28

Steps to reproduce

I start off with a docker image with the required dependencies:

# Use an Ubuntu base image
FROM ubuntu:22.04

# Set environment variables
ENV ANDROID_HOME /opt/android-sdk
ENV PATH "$PATH:/opt/android-sdk/cmdline-tools/latest/bin:/opt/android-sdk/platform-tools"

# Install dependencies as root
RUN apt-get update && \
    DEBIAN_FRONTEND=noninteractive apt-get install -y \
    curl \
    jq \
    openjdk-17-jdk \
    swig \
    git \
    unzip \
    zip \
    wget && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# Download and install Android SDK
RUN mkdir -p /opt/android-sdk/cmdline-tools && \
    wget -q https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip -O /opt/android-sdk/cmdline-tools/tools.zip && \
    unzip /opt/android-sdk/cmdline-tools/tools.zip -d /opt/android-sdk/cmdline-tools && \
    rm /opt/android-sdk/cmdline-tools/tools.zip && \
    yes | /opt/android-sdk/cmdline-tools/cmdline-tools/bin/sdkmanager --sdk_root=/opt/android-sdk "build-tools;34.0.0" "platform-tools" "platforms;android-34" "ndk;23.1.7779620"

# Add a new user and set permissions
RUN useradd --uid 1000 --create-home --shell /bin/bash appuser && \
    chown -R appuser:appuser /opt/android-sdk

USER appuser
WORKDIR /home/appuser

# Clone the repository (optional)
RUN git clone https://github.com/Blockstream/green_android.git green_android

WORKDIR /home/appuser/green_android

CMD ["/bin/bash"]

Expected behaviour

Produce an APK

Actual behaviour

Build Error

Screenshots

Pastebin

Device or machine

Distributor ID: Debian
Description: Debian GNU/Linux 12 (bookworm)
Release: 12
Codename: bookworm

Additional info

FAILURE: Build failed with an exception.

* What went wrong:
Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)

* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

* Exception is:
org.gradle.launcher.daemon.client.DaemonDisappearedException: Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)
        at org.gradle.launcher.daemon.client.DaemonClient.handleDaemonDisappearance(DaemonClient.java:273)
        at org.gradle.launcher.daemon.client.DaemonClient.monitorBuild(DaemonClient.java:246)
        at org.gradle.launcher.daemon.client.DaemonClient.executeBuild(DaemonClient.java:201)
        at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:165)
        at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:97)
        at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:57)
        at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:167)
        at org.gradle.launcher.cli.DefaultCommandLineActionFactory$ParseAndBuildAction.execute(DefaultCommandLineActionFactory.java:259)
        at org.gradle.launcher.cli.DefaultCommandLineActionFactory$ParseAndBuildAction.execute(DefaultCommandLineActionFactory.java:230)
        at org.gradle.launcher.cli.DebugLoggerWarningAction.execute(DebugLoggerWarningAction.java:74)
        at org.gradle.launcher.cli.DebugLoggerWarningAction.execute(DebugLoggerWarningAction.java:30)
        at org.gradle.launcher.cli.WelcomeMessageAction.execute(WelcomeMessageAction.java:96)
        at org.gradle.launcher.cli.WelcomeMessageAction.execute(WelcomeMessageAction.java:40)
        at org.gradle.launcher.cli.NativeServicesInitializingAction.execute(NativeServicesInitializingAction.java:44)
        at org.gradle.launcher.cli.NativeServicesInitializingAction.execute(NativeServicesInitializingAction.java:26)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:41)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:26)
        at org.gradle.launcher.cli.DefaultCommandLineActionFactory$WithLogging.execute(DefaultCommandLineActionFactory.java:361)
        at org.gradle.launcher.Main.doAction(Main.java:35)
        at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:50)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:60)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:37)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.gradle.launcher.GradleMain.main(GradleMain.java:34)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:35)
        at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:110)
        at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:66)
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

1 participant