Title: How to can i build for android using github actions · NativeScript · Discussion #10693 · GitHub
Open Graph Title: How to can i build for android using github actions · NativeScript · Discussion #10693
X Title: How to can i build for android using github actions · NativeScript · Discussion #10693
Description: How to can i build for android using github actions
Open Graph Description: I have setup a workflow file using menny/android image for container. I usually use that for my android projects. Here is my workflow, so i wanted to see what the template "myCoolApp" for javascrip...
X Description: I have setup a workflow file using menny/android image for container. I usually use that for my android projects. Here is my workflow, so i wanted to see what the template "myCoolApp" for...
Opengraph URL: https://github.com/orgs/NativeScript/discussions/10693
X: @github
Domain: Github.com
{"@context":"https://schema.org","@type":"QAPage","mainEntity":{"@type":"Question","name":"How to can i build for android using github actions","text":"\u003cp dir=\"auto\"\u003eI have setup a workflow file using menny/android image for container. I usually use that for my android projects.\u003cbr\u003e\nHere is my workflow, so i wanted to see what the template \"myCoolApp\" for javascript looked like and tried building it ,\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-yaml notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"name: nativeScript\n\non:\n push:\n branches: Nad\njobs:\n build:\n runs-on: ubuntu-latest\n container: johnel/nativescript\n steps:\n - uses: actions/checkout@v4\n - name: Run g4f\n run: |\n ns create myCoolApp --js\n cd myCoolApp\n ns build android\n gh release create \u0026quot;${{ github.run_number }}.0.0\u0026quot; myCoolapp.zip\n env:\n GITHUB_TOKEN: ${{ secrets.TK }}\n shell: bash\"\u003e\u003cpre class=\"notranslate\"\u003e\u003cspan class=\"pl-ent\"\u003ename\u003c/span\u003e: \u003cspan class=\"pl-s\"\u003enativeScript\u003c/span\u003e\n\n\u003cspan class=\"pl-ent\"\u003eon\u003c/span\u003e:\n \u003cspan class=\"pl-ent\"\u003epush\u003c/span\u003e:\n \u003cspan class=\"pl-ent\"\u003ebranches\u003c/span\u003e: \u003cspan class=\"pl-s\"\u003eNad\u003c/span\u003e\n\u003cspan class=\"pl-ent\"\u003ejobs\u003c/span\u003e:\n \u003cspan class=\"pl-ent\"\u003ebuild\u003c/span\u003e:\n \u003cspan class=\"pl-ent\"\u003eruns-on\u003c/span\u003e: \u003cspan class=\"pl-s\"\u003eubuntu-latest\u003c/span\u003e\n \u003cspan class=\"pl-ent\"\u003econtainer\u003c/span\u003e: \u003cspan class=\"pl-s\"\u003ejohnel/nativescript\u003c/span\u003e\n \u003cspan class=\"pl-ent\"\u003esteps\u003c/span\u003e:\n - \u003cspan class=\"pl-ent\"\u003euses\u003c/span\u003e: \u003cspan class=\"pl-s\"\u003eactions/checkout@v4\u003c/span\u003e\n - \u003cspan class=\"pl-ent\"\u003ename\u003c/span\u003e: \u003cspan class=\"pl-s\"\u003eRun g4f\u003c/span\u003e\n \u003cspan class=\"pl-ent\"\u003erun\u003c/span\u003e: \u003cspan class=\"pl-s\"\u003e|\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e ns create myCoolApp --js\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e cd myCoolApp\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e ns build android\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e gh release create \"${{ github.run_number }}.0.0\" myCoolapp.zip\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e\u003c/span\u003e \u003cspan class=\"pl-ent\"\u003eenv\u003c/span\u003e:\n \u003cspan class=\"pl-ent\"\u003eGITHUB_TOKEN\u003c/span\u003e: \u003cspan class=\"pl-s\"\u003e${{ secrets.TK }}\u003c/span\u003e\n \u003cspan class=\"pl-ent\"\u003eshell\u003c/span\u003e: \u003cspan class=\"pl-s\"\u003ebash\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eI 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.\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"A 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 \"\u003e\u003cpre lang=\"text\" class=\"notranslate\"\u003e\u003ccode class=\"notranslate\"\u003eA 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\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eJust incase you need it . I created a simple image\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-dockerfile notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"FROM menny/android\nMAINTAINER John Delvin \u0026lt;johndelvin51@gmail.com\u0026gt;\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\"\u003e\u003cpre class=\"notranslate\"\u003e\u003cspan class=\"pl-k\"\u003eFROM\u003c/span\u003e menny/android\n\u003cspan class=\"pl-k\"\u003eMAINTAINER\u003c/span\u003e John Delvin \u0026lt;johndelvin51@gmail.com\u0026gt;\n\n\u003cspan class=\"pl-c\"\u003e\u003cspan class=\"pl-c\"\u003e#\u003c/span\u003e NodeJS\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003eRUN\u003c/span\u003e apt-get update -y\n\u003cspan class=\"pl-k\"\u003eRUN\u003c/span\u003e apt-get install nodejs -y\n\u003cspan class=\"pl-k\"\u003eRUN\u003c/span\u003e apt-get install npm -y\n\u003cspan class=\"pl-k\"\u003eRUN\u003c/span\u003e wget https://github.com/cli/cli/releases/download/v2.50.0/gh_2.50.0_linux_amd64.deb\n\u003cspan class=\"pl-k\"\u003eRUN\u003c/span\u003e apt install -y ./gh_2.50.0_linux_amd64.deb\n\u003cspan class=\"pl-k\"\u003eRUN\u003c/span\u003e npm install -g nativescript\u003c/pre\u003e\u003c/div\u003e","upvoteCount":2,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"\u003cp dir=\"auto\"\u003eHi, you can enable abi splits \u003ca href=\"https://old.docs.nativescript.org/angular/tooling/publishing/android-abi-split#enable-abi-split\" rel=\"nofollow\"\u003ehttps://old.docs.nativescript.org/angular/tooling/publishing/android-abi-split#enable-abi-split\u003c/a\u003e 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.\u003c/p\u003e","upvoteCount":0,"url":"https://github.com/orgs/NativeScript/discussions/10693#discussioncomment-12136166"}}}
| route-pattern | /_view_fragments/Voltron::DiscussionsFragmentsController/show/orgs/:org/:discussion_number/discussion_layout(.:format) |
| route-controller | voltron_discussions_fragments |
| route-action | discussion_layout |
| fetch-nonce | v2:20e4371e-7d2c-597c-b282-d77c10d0191f |
| current-catalog-service-hash | 9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be |
| request-id | E6D2:26DDA4:B11D3C:F1AACD:6A63B548 |
| html-safe-nonce | 46fdea410bdda3d3ba9c6714b3a4d40d4353785b6743f453e64b85e5211432b0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNkQyOjI2RERBNDpCMTFEM0M6RjFBQUNEOjZBNjNCNTQ4IiwidmlzaXRvcl9pZCI6IjY2MjY2MDI2MjQ5OTMxNzg5NTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 07fe9ab6bfb04a9db634f6f6f4dc94fdf4cbb24791489a24d1e3ed719bab6c16 |
| hovercard-subject-tag | discussion:7941907 |
| github-keyboard-shortcuts | repository,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/Voltron::DiscussionsFragmentsController/show/orgs/NativeScript/10693/discussion_layout |
| twitter:image | https://opengraph.githubassets.com/19779d1fc4dbd0d0ecf666d9b912868af25dd5467e29d3773f53ffe983d6a0e7/orgs/NativeScript/discussions/10693 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/19779d1fc4dbd0d0ecf666d9b912868af25dd5467e29d3773f53ffe983d6a0e7/orgs/NativeScript/discussions/10693 |
| og:image:alt | I have setup a workflow file using menny/android image for container. I usually use that for my android projects. Here is my workflow, so i wanted to see what the template "myCoolApp" for javascrip... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b1a203abf5b8fb9010b42a32ce0f19fb6e11e656f254d0d3dcdba4b65a6961a6 |
| turbo-cache-control | no-preview |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 31492490 |
| octolytics-dimension-repository_nwo | NativeScript/NativeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31492490 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/NativeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3ae9132c55b60e2a8f9553322217eb369dd24575 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width