Android apk is not updating in Quasar using cordova - android

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

Related

Ionic build command

i have same problem whit the command:
ionic cordova build android
the process termined with successfull and it create the apk.
if i send the apk on my smartphone, it see the file same zip and not install
The app work all right, and i can test it with
ionic cordova run android
but i can not generate the apk.
My configuration:
Ionic 6.18.2
gradle 7.4
node 16.14.0
npm 8.3.1
java 1.8.0_321
can someone help me?

How to launch a Cordova project with full rebuilding of plugins?

I'm working on a Cordova plugin. As a plugin can't be executed, I'm using a Cordova project to test it. I found that running a Cordova project will not reimport and rebuild plugins, so currently I'm doing this:
rmdir \"./plugins/my-plugin\" /q /s
cordova platform remove android
cordova platform add android
cordova run android --device
Did I miss something or Cordova really doesn't have a command to fully rebuild everything before running the project?
Unfortunately, cordova will check your plugins folder only when adding or updating a plugin or platform. Then it will build and copy the needed plugin(s) into the designated OS in the platforms folder.
By your script I assume the source of the plugin is outside of the project folder. So the script you're using should do the work. But if I may give you a better solution would be as follows:
Create a Symlink/shortcut of the source folder for your plugin into the plugins folder, so you'll not need to remove the folder and stress the disk into copying files everytime you want to run the update.
Your "update" script should delete only the installed plugin folder at platforms/android/platform_www/plugins/my-plugin and it'll make the update far more quickier than removing and adding the platform again.

Run / Build Apk is not updated with the latest changes

I have a problem in my vuejs + cordova project, when there is an edit file for example (login.vue) the changes only appear when running the 'npm run serve' command but when running the command 'cordova run browser / android' the login.vue file is not updated. I've tried clear cache 'npm clear cache' and 'cordova clean / cordova prepare' the results are still the same.
Command Before run/build cordova :
npm run serve
npm run build
cd cordova_app
cordova run/build android or browser
it is because the latest changes you made to files need to be brought to the platform folder (E.g. $projectroot/platform/android/www).
For this you have two options:
you can edit the file here directly
$projectroot/platform/$platform_name/www, but as a result, if you delete the platform, then that change will get lost.
Or you can make also make the changes in $projectroot/www/ but you will need to run few commands: cordova platform remove android and cordova platform add android if it is for Android. Please note that this will also overwrite any special configuration you have made in your IDE (xCode for iOS or Android Studio for Android) because it regenerates from your code, a new workspace for your app to be compiled, including your latest code, all in the platform folder.
Good luck!

Phonegap 4.2.0 doesn't produce APK

I'm trying to compile a simple Hello World phonegap application.
phonegap create hello com.example.hello HelloWorld
phonegap cordova platform add android
I have JAVA installed, and Android SDK installed so everything works up until this point.
I then try to produce simple APK, by running
phonegap build android
according to documentation it should appear in platform/android/bin
but it just doesn't, I've tried various flags, like --release etc, but nothing helps.
The output I get when building:
$ phonegap build android
[phonegap] executing 'cordova build android'...
[phonegap] completed 'cordova build android'
when building for FirefoxOS for example, - I get package.zip in bin folder, but nothing for Android...
When using cordova instead of phonegap, the path of the apk generated is displayed at the end. Maybe should you run cordova directly instead of phonegap?
Anyway, since about version 3.6, apks are no more generated in platform/android/bin but instead in platforms/android/ant-build.

how to run sencha app on a physical device

I want to run my sencha app on an android tablet. I wrote "sencha app build" to compile it. And the compilation was successfull. But now how can I run it on my tablet?
Follow below steps :
Run command sencha app build production. It will create production build inside build folder.
You can use either cordova or phonegap,i am using cordova,you can install it by below command.
npm install -g cordova
Create a cordova app in another directory.
cordova create scraper com.test.scraper Scraper
Step 3 will create a directory scraper, Now execute below command in sequence's.
cd scraper
cordova platform add android
Now copy the build\production\scraper\ folder data(from step 1),Ex :-(your_app_name)\build\production\scraper\ to cordova app www folder.
Now run cordova app build android
Step 6 will create apk file inside *platforms\android\ant-build\* folder.Now you can install this apk to your android tablet.
For more Information,you can refer :-
http://www.sencha.com/forum/showthread.php?270566-Building-Sencha-Touch-2-Phonegap-Application-for-Android-Windows/page2
http://cordova.apache.org/docs/en/3.6.0/guide_cli_index.md.html#The%20Command-Line%20Interface

Categories

Resources