'Ionic cordova build aandroid --release aab "Web page not available"
I created a simple ionic app, works good if i build with --packageType=apk
and install it to the phone or run with --livereload
but when i build it locally without --packageType=apk
or run the pipeline on git actions the app will show this error:
this is the pipeline:
name: android_build
on:
push:
branches:
- main
jobs:
build:
name: Build APK
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Setup java
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Install Cordova
run: npm install -g cordova
- name: Install Ionic
run: npm install -g @ionic/cli && npm i -g cordova-res
- name: Install app dependencies
run: npm install
- name: Add resources
run: ionic cordova resources
- name: sdk version
run: sdkmanager --uninstall 'build-tools;31.0.0' && sdkmanager --uninstall 'build-tools;32.0.0' && sdkmanager "build-tools;30.0.3" "platforms;android-30"
- name: Add Android platform
run: ionic cordova platform add android
- name: Build Android Release APK
run: cordova build android --release --prod -- --keystore=./app-mobile.keystore --storePassword=${{ secrets.KEYSTORE_PASS }} --alias=app-mobile --password=${{ secrets.KEYSTORE_PASS }}
- name: Upload APK
uses: actions/upload-artifact@v1
with:
name: app-release.aab
path: platforms/android/app/build/outputs/bundle/release/app-release.aab
on ios works good,
any hints?
thanks
update:
when adding ionic cordova prepare android
before build
everything works as expected
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|