This is linked to this question but also just a general understanding of how the platform works because I can’t seem to get it right.
I have been battling with an android build on Appflow for a while, but the same code builds debug and release apks in Android studio. I think I have narrowed it down. Appflow builds work when I remove android.useAndroidX=true
and android.enableJetifier=true
in gradle.properties
. But if I do this locally, the builds fail.
-
How do I make sure Appflow will build the app the same way the app builds locally? I get this quite often; I have to resort to using Android studio and upload builds manually on Google Play Store.
-
If Android folder is pushed to Github, is it used at all when I run git push ionic
and doing builds on Appflow?
-
Doesn’t Appflow use whatever package versions I have in package.json or any other package and/or config file?
Hi dlodeprojuicer,
For your Capacitor project, it is recommended that you have all of the capacitor versions on the same and latest. Could you try updating the capacitor/core, capacitor/CLI, capacitor/android, and capacitor/ios to the latest version.
Reference: @capacitor/cli - npm
@capacitor/core - npm
https://www.npmjs.com/package/@capacitor/ios
https://www.npmjs.com/package/@capacitor/android
Also, It looks like you are using a pre-release version of the Ionic Vue framework. You can install the latest here: https://www.npmjs.com/package/@ionic/vue
I would recommend upgrading the above as having the latest web-view version updates might help resolve the issues that you are seeing with your app.
- How do I make sure Appflow will build the app the same way the app builds locally? I get this quite often; I have to resort to using Android studio and upload builds manually on Google Play Store.
The build in appflow is a bit different compared to your local machine. Your local machine might cache some of the libraries or dependencies and use them during build but a build in Appflow starts on a fresh VM (which is discarded after every build for security reasons) and is very much different from a persistent system (local machine).
Appflow goes through various steps with every build, which might not happen every time on a local system.
- If Android folder is pushed to Github, is it used at all when I run
git push ionic
and doing builds on Appflow?
Yes, in a capacitor project, the android platform that you commit is used during the build in appflow, and therefore it is required.
- Doesn’t Appflow use whatever package versions I have in package.json or any other package and/or config file?
Yes, you are right. Appflow uses the package versions that you specify in your package.json file and
If you are facing any further issues, I would encourage you to contact the Appflow support for further assistance.
Cheers,