termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
13.03k stars 2.99k forks source link

[Bug]: androidjs not working on the build stage #21527

Closed DuilioPerez closed 4 hours ago

DuilioPerez commented 4 hours ago

Problem description

AndroidJS it is a node package to convert a web project into an APK. It only requires nodejs and the JDK to work. But in Termux it can't build the APK. The log is the following:

 $ androidjs b
--release= false
(node:16316) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
copying assets ...
updating app name...
Setting app version ...
Version Code: 1000032
Version Name: 1.0.0
updating theme ...
Using SDK: 2.3.0
Building Apk ...
non zero exit code: failed to build apk
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/data/data/com.termux/files/usr/tmp/brut_util_Jar_117095993120653068321135023830087336858.tmp, p, --forced-package-id, 127, --min-sdk-version, 19, --target-sdk-version, 33, --version-code, 1000032, --version-name, 1.0.0, --no-version-vectors, -F, /data/data/com.termux/files/usr/tmp/APKTOOL4096063572657258932.tmp, -e, /data/data/com.termux/files/usr/tmp/APKTOOL6957194567619474062.tmp, -0, arsc, -I, /data/data/com.termux/files/home/.androidjs/cache/1.apk, -S, /data/data/com.termux/files/home/.androidjs/cache/androidjs-sdk/res, -M, /data/data/com.termux/files/home/.androidjs/cache/androidjs-sdk/AndroidManifest.xml]
W: /data/data/com.termux/files/usr/tmp/brut_util_Jar_117095993120653068321135023830087336858.tmp[1]: ELF: inaccessible or not found
W: /data/data/com.termux/files/usr/tmp/brut_util_Jar_117095993120653068321135023830087336858.tmp[2]: syntax error: unexpected ')'

 $

What steps will reproduce the bug?

  1. Install nodejs and openjdk-17: apt install nodejs openjdk-17 -y.
  2. Install androidjs: npm install -g androidjs-builder.
  3. androidjs init test-app
  4. cd test-app
  5. androidjs b <- Here's the error.

What is the expected behavior?

Create an apk

System information

Termux Variables:
TERMUX_API_VERSION=0.50.1
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=15756
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://packages-cf.termux.dev/apt/termux-main/ stable main
# glibc-repo (sources.list.d/glibc.list)
deb https://packages-cf.termux.dev/apt/termux-glibc/ glibc stable
# tur-repo (sources.list.d/tur.list)
deb https://tur.kcubeterm.com tur-packages tur tur-on-device tur-continuous
# x11-repo (sources.list.d/x11.list)
deb https://packages-cf.termux.dev/apt/termux-x11/ x11 main
Updatable packages:
curl/stable 8.10.1 aarch64 [upgradable from: 8.10.0]
emscripten-binaryen/stable 3.1.67 aarch64 [upgradable from: 3.1.66]
emscripten-llvm/stable 3.1.67 aarch64 [upgradable from: 3.1.66]
emscripten/stable 3.1.67 all [upgradable from: 3.1.66]
findutils/stable 4.10.0 aarch64 [upgradable from: 4.9.0-2]
firefox/x11 130.0.1 aarch64 [upgradable from: 130.0]
gst-libav/stable 1.24.8 aarch64 [upgradable from: 1.24.7]
gst-plugins-bad/stable 1.24.8 aarch64 [upgradable from: 1.24.7]
gst-plugins-base/stable 1.24.8 aarch64 [upgradable from: 1.24.7]
gst-plugins-good/stable 1.24.8 aarch64 [upgradable from: 1.24.7]
gst-plugins-ugly/stable 1.24.8 aarch64 [upgradable from: 1.24.7]
gstreamer/stable 1.24.8 aarch64 [upgradable from: 1.24.7]
libcurl/stable 8.10.1 aarch64 [upgradable from: 8.10.0]
libgcrypt/stable 1.11.0 aarch64 [upgradable from: 1.10.3-2]
libtiff/stable 4.7.0 aarch64 [upgradable from: 4.6.0]
libxml2-utils/stable 2.13.4 aarch64 [upgradable from: 2.13.3]
libxml2/stable 2.13.4 aarch64 [upgradable from: 2.13.3]
libzip/stable 1.11.1 aarch64 [upgradable from: 1.10.1-1]
openssh-sftp-server/stable 9.9p1-2 aarch64 [upgradable from: 9.8p1-4]
openssh/stable 9.9p1-2 aarch64 [upgradable from: 9.8p1-4]
termux-auth/stable 1.4.1 aarch64 [upgradable from: 1.4-2]
termux-tools version:
1.43.5
Android version:
11
Kernel build information:
Linux localhost 4.14.186-22735277 #1 SMP PREEMPT Sat Feb 19 02:14:57 KST 2022 aarch64 Android
Device manufacturer:
samsung
Device model:
SM-A225M
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
Installed termux plugins:
com.termux.api versionCode:51
com.termux.x11 versionCode:15
com.termux.styling versionCode:32
TomJo2000 commented 4 hours ago

We don't offer any such package.

As such it has not been tested to work as intended with Termux, and we do not offer any official support for it.