Quasar Build Android

0 views
Skip to first unread message

Madox Valdivia

unread,
Aug 3, 2024, 5:21:04 PM8/3/24
to apasarad

I am learning quasar and I created a new project using quasar init name. I then move into the new project root directory and ran quasar mode -a cordova to add a cordova project. I cd to src-cordova and run cordova platform add android and cordova requirements. No errors on the requirements check. I go back to the project root and run quasar dev -m cordova -T android. Its results in a empty page that says "webpage at ip:port could not be loaded because net::ERR_ADDRESS_UNREACHABLE". Running quasar dev works fine and quasar dev -m electron works as well.

When I install it on ios with quasar dev -m cordova -T ios I get a blank page. Also if I cd to the src-cordova directory I can manually install the starter cordova app on ios or android without issue. Why am I getting this error on android and a blank page on ios with just a default project?

Turns out my most recent comment was correct. It is a requirement for the dev computer to be on the same network as the mobile device you wand to install the app on using quasar dev -m cordova -T android/ios. Once I got that set up and there was communication between my computer and the mobile devices, this problem went away.

I'm using Quasar to develope an App and a website. When I build the android app via 'cordova build android' in the cordova folder I get a new .apk, but it's content is old. Which command am I missing to update the ressources of the apk. I tried 'cordova clean' or deleating the dist folder in the quasar project and doing 'quasar build' but it didn't help. Which files does cordova use and how are they getting updated? Any idea?

I found out, you have to run 'quasar build -m cordova -T android' in the quasar-project-folder to overwrite the files in the cordova folder and then run 'cordova build android' (this one has to be done inside the cordova folder) to get the new apk. Maybe you'll have to delete your previous apk before building in cordova

I struggled with this my self for couple of days. I will try to answer it as detailed as I can. Maybe you will find some problems that are dependent on your application, but at least you will have something to work with.

As I can understand you have a quasar application that is using cordova and you want to build Android App Bundle (.aab) file to publish it to the Google Play Store, because now play store accepts only .aab files.

First quasar as a framework has nothing to do with this. Quasar framework just builds your web app and the build output is stored in src-cordova/www folder. It doesn't matter if you are using Quasar v1 or v2.

Cordova is a framework that will create the whole project structure (android / iOS) a.k.a cordova platforms and run the specific build tools to build the poject using command lines (gradle cli / xcode cli).

To install cordova-android-v10, first you will need to remove the android platform you have now i.e. src-cordova/platforms/android folder. After that navigate in src-cordova folder. And install cordova android platform v10 with following command cordova platform add [email protected].

Now you should be able to build the android cordova project with gradle. Go to src-cordova/aplatforms/android and execute gradle build. If everything is ok you can go to your root project folder end execute npm run build:android.

If you do not add minSdkVersion 22 you will have problems with MultiDex support. This is due to that API level 22 (Android 5.1) by default enables multi DEX files applications. If you min target below 22 you will have exceptions like:

If you have troubles like this remove src-cordova/plugins folder and do cordova build android in src-cordova folder to reinstall all plugins. If error pops out try to install replacement plugin for the one that is failing.

The main challenge was figuring out a way to access the PWA, which runs on my local machine from my Android device (Samsung Galaxy S10). Why? Because PWA requires HTTPS access so using IP addresses is not an option.

It was a true joy to work with Quasar since it made the whole process of generating a PWA out-of-the-box without writing a single line of code. So head over to unfor19/pwa-quasar-local and do your PWA magic!

Quasar is a full stack framework for building modern web applications. It is based on Vue.js and uses the same tooling and workflow. It is a collection of plugins, components, and libraries that allow you to build your app in a matter of minutes.

Nuxt 3 is a framework for creating Vue.js applications. It is based on Vue 3, Vue Router 4 and Vite. It is designed from the ground up to be incrementally adoptable. Nuxt 3 is the next evolution of the framework and it is not a rewrite. It is built with the future in mind and leverages the best features of Vue 3 and Vite.

Quasar 2 is a great framework for building web apps. It is easy to use and has a lot of features. However, it is not easy to use with Nuxt 3. There are some issues with Nuxt 3 and Quasar 2. For example, Nuxt 3 does not support the quasar.conf.js file. It also does not support the quasar command. This is why I created this starter template.

c80f0f1006
Reply all
Reply to author
Forward
0 new messages