Replies: 2 comments 2 replies
-
Hi @jis248, referring to your sentence, This happens for new versions of android but works on some older versions., I am assuming that when building with Android 11, the package installs ok, but when installing a higher version, you are getting the aforementioned error. Though, I do not see any script that installs a higher Android SDK in your YAML. Anyways, I will need you to elaborate on it and please provide build IDs where it works and fails. |
Beta Was this translation helpful? Give feedback.
-
I am closing the thread due to inactivity. Let me know if you have any more questions by replying to this thread or opening a new one. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
If you are looking for help, please confirm the following...
Which mobile framework are you using?
Ionic/Cordova
Steps to reproduce
Build is a Success and after install on android it gives error
"App not installed as package apprears to be invalid"
// codemagic.yaml
android-workflow:
name: Android workflow
environment:
android_signing:
- keystore_android
# groups:
# - google_play # <-- (Includes GCLOUD_SERVICE_ACCOUNT_CREDENTIALS - Put your google-services.json here)
java: 1.8
node: v16.14.0
npm: 9.1.2
cache:
cache_paths:
- $CM_BUILD_DIR/node_modules
scripts:
- name: Install dependencies
script: |
wget https://services.gradle.org/distributions/gradle-5.6.2-bin.zip
unzip -q gradle-5.6.2-bin.zip
export GRADLE_HOME=$PWD/gradle-5.6.2
export PATH=$GRADLE_HOME/bin:$PATH
gradle -v
npm install
npm ci # equivalent of npm install for CI systems.
# Requires package-lock.json or npm-shrinkwrap.json to be present
cvm install 9.0.0
cvm use 9.0.0
npm install -g ionic
ionic info
- name: Add Android platform
script: |
ionic cordova platform remove android --nosave
ionic cordova platform add android
--confirm
--no-interactive
--noresources
- name: Build Android
script: |
ionic cordova build android
--release
--no-interactive
--prod
--device
- name: Sign APK
script: |
APK_PATH=$(find platforms/android/app/build/outputs/apk/release -name ".apk" | head -1)
jarsigner
-sigalg SHA256withRSA
-digestalg SHA-256
-keystore $CM_KEYSTORE_PATH
-storepass $CM_KEYSTORE_PASSWORD
-keypass $CM_KEY_PASSWORD
$APK_PATH $CM_KEY_ALIAS
- name: Verify Sign APK
script: |
APK_PATH=$(find platforms/android/app/build/outputs/apk/release -name ".apk" | head -1)
jarsigner
-verify
-verbose
$APK_PATH $CM_KEY_ALIAS
artifacts:
- platforms/android/app/build/outputs//*.apk
- platforms/android/app/build/outputs//mapping.txt
Expected results
apk should work in all android devices
Actual results
This happens for new versions of android but works on some older versions.
note: There is no sdk version issue.
i have created a release apk on my local and it works on all devices. I have checked the verify apk commands and signed apk.
My system

Build id (optional)
No response
Beta Was this translation helpful? Give feedback.
All reactions