I 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.
\nA compatible Android SDK for compilation is found.\nJavac is installed and is configured properly.\nThe Java Development Kit (JDK) is installed and is configured properly.\nLocal builds for iOS can be executed only on a macOS system. To build for iOS on a different operating system, you can use the NativeScript cloud infrastructure.\n✔ Your ANDROID_HOME environment variable is set and points to correct directory.\n✔ Your adb from the Android SDK is correctly installed.\n✔ A compatible Android SDK for compilation is found.\n✔ Javac is installed and is configured properly.\n✔ The Java Development Kit (JDK) is installed and is configured properly.\n✔ Local builds for iOS can be executed only on a macOS system. To build for iOS on a different operating system, you can use the NativeScript cloud infrastructure.\n✖ WARNING: The Android SDK is not installed or is not configured properly. \n You will not be able to run your apps in the native emulator. To be able to run apps\nin the native Android emulator, verify that you have installed the latest Android SDK \nand its dependencies as described in \n
Just incase you need it . I created a simple image
\nFROM menny/android\nMAINTAINER John Delvin <[email protected]>\n\n# NodeJS\nRUN apt-get update -y\nRUN apt-get install nodejs -y\nRUN apt-get install npm -y\nRUN wget https://github.com/cli/cli/releases/download/v2.50.0/gh_2.50.0_linux_amd64.deb\nRUN apt install -y ./gh_2.50.0_linux_amd64.deb\nRUN npm install -g nativescript
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.
","upvoteCount":0,"url":"https://github.com/orgs/NativeScript/discussions/10693#discussioncomment-12136166"}}}How to can i build for android using github actions #10693
-
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: bash I 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 <[email protected]>
# 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 |
Beta Was this translation helpful? Give feedback.
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. |
Beta Was this translation helpful? Give feedback.
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.