How to can i build for android using github actions #10693
Answered
by
ammarahm-ed
John4650-hub
asked this question in
Q&A
|
I have setup a workflow file using menny/android image for container. I usually use that for my android projects. name: nativeScript
on:
push:
branches: Nad
jobs:
build:
runs-on: ubuntu-latest
container: johnel/nativescript
steps:
- uses: actions/checkout@v4
- name: Run g4f
run: |
ns create myCoolApp --js
cd myCoolApp
ns build android
gh release create "${{ github.run_number }}.0.0" myCoolapp.zip
env:
GITHUB_TOKEN: ${{ secrets.TK }}
shell: bashI have ran into the same error that has be reported multiple time by alot of new users. I was detetmined to get started but something like settingup a simple build environment has taken me sometime. Just incase you need it . I created a simple image FROM menny/android
MAINTAINER John Delvin <johndelvin51@gmail.com>
# NodeJS
RUN apt-get update -y
RUN apt-get install nodejs -y
RUN apt-get install npm -y
RUN wget https://github.com/cli/cli/releases/download/v2.50.0/gh_2.50.0_linux_amd64.deb
RUN apt install -y ./gh_2.50.0_linux_amd64.deb
RUN npm install -g nativescript |
Answered by
ammarahm-ed
Feb 11, 2025
Replies: 1 comment 3 replies
|
I would appreciate it if anyone could create an uptodate docker image to automate the whole process as this issue is really discouraging alot of guys from using Nativescript. |
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, you can enable abi splits https://old.docs.nativescript.org/angular/tooling/publishing/android-abi-split#enable-abi-split to reduce the size of your apk. NativeScript android app pack v8 which is around 15-20MB in size for each architecture. Right now you are building universal apk which packs everything for all archs making the apk around 90MBs. In reality when you release your app to the android playstore as an aab, the final release apk will be much smaller in size.