I am a newbie on using cordova (or phonegap), I was doing some demo projects and found a strange problem on deploying the projects on my android phone (Nexus 5)
when I run: "cordova run android"
everything seems fine and the app is installed on my phone as well, however, I found that after successfully installing the app, the EARLIER installed app /demos (created by cordova as well) was removed!!!
I was wondering if it was related to any platform dependent settings on android? It seems that no matter what the built apk's name was, it would eventually uninstall the already installed cordova apps; by then the new cordova app would be installed (sort of like file copying and the new file would overwrite the existing file -- assume same file name)
Anybody got clues on this???
Jason
Related
I have an app made in Ionic5 framework with the support of Angular, when I run ionic serve --lab, the android app works without problem but the problem is that when I export the project to Android Studio with (ionic capacitor copy android) and I run the app on my device suddenly crashes and stops.
I have been looking for information but I have not found any useful data. My question is more generic than this platform is used to. What error detecting techniques I should use (Android Studio, npm vulnerabilities) and what are some typical cases that generate this error?
I let some posible useful project data:
I use Firebase for database and back-end services.
NPM warn me due to the fact that I have 10 vulnerabilities.
Ther could be a number of reasons for this.
Try running opening chrome://inspect/#devices where you can select your device and see all console logs.
Also try syncing your gradle files in android studio
After installing my Ionic2 app on real device, it became slow - which wasn't while testing on browser during development. Then I came across Crollwalk, a tool/plugin to enhance Hybrid app performance on device.
I then generated an .apk and attempted to install on real-device, only to get the error "This app isn't compatible with your phone".
After few Bing/Google searches, I got to know that the project was last supported for WebView on Cordova 6.3 at the Crosswalk Project official website.
My dev env is
Cordova: 6.5.0,
Ionic: 2.2.3
How do I downgrade Cordova to the supported version of Crosswalk without affecting Ionic and the project it self?
Thanks for your usual assistance.
Finally, I got a walk-around!
I had to create build-extras.gradle file and added cdvBuildMultipleApks=false to it. That now generated a single unsigned apk file (instead of armv7 and x86 respectively) which I signed & was able to launch the app!
Before then, I used to sign the android-x86-release-unsigned.apk.
Thanks to building-combined-armv7-x86-apk-after-crosswalk-integration-in-an-ionic-project
I have seen several questions similar to this, but none of the accepted answers have worked for me. I've tried deleting the apk folder, adding no cache meta tags to the html (which doesn't update anyway), incrementing the android version number, incrementing the app version number, incrementing the javascript file version number in the script tag; I've tried uninstalling the android platform and reinstalling; I've uninstalled the app from my phone repeatedly; I've run cordova clean over and over again, I've tried deleting all the www folders in the platform/android directory. I've even started the app from scratch after a clean install of cordova.
No matter what I do, the changes I make to index.html or index.js do not update on my android phone. Even when it's clear they've updated everywhere in the build files, and the apk has to be recreated because I manually deleted it, my phone pulls up the app exactly as it was on my first test build. Not a single change has ever been updated on the android platform. Except, the version number will change, just not the html or javascript files themselves.
The ios platform updates just fine, as does the browser platform, obviously.
I'm using the cordova cli, no phonegap app, just pure cordova in terminal.
I'm on mac osx high sierra, with the latest android studio.
adb is 1.0.39.
cordova 8.0.
node 9.3.
javac 1.8.0_151.
ant 1.10.1.
homebrew 1.4.3.
update i also just tried removing the index.html and index.js files and replacing them with bare bones, essentially empty files (basic declarations in the html file). I ran cordova clean and then cordova run android --device and the app installed on my android, with the original index files. I.e., still not updating changed content, even brand new files.
Confirmed resolution: after a clean install and a one-by-one addition of my plugins, with html updates in between each plugin install, I've confirmed that the issue was an incompatibility with the android-fingerprint-auth plugin. Without that installed, I get a proper updates on the android app. If I install that plugin and then uninstall it, updates continue not to work. I.e., it does some permanent damage to the app.
We're working in an app for Android/IOS and the team has at least 3 people working in the app code and who need to have the app running locally in their particular env, someone is developing over Mac OS to eventually build to iOS and the others are on Windows machines.
We've been experiencing problems with the Ionic project after installing ngCordova, some cordova plugins and the ionic-platform-web-client, the mac machine had the app running beautifully and the windows instances were broken complaining that: Module 'ionic.service.core' is not available!
We don't know which particular step caused the code inconsistency and after several hours of looking around to fix it we decided just to create a new Ionic project and copy our specific www code inside. Since we don't want that to happen again we need to figure a reliable method of keeping all platforms working right after we install a plugin or add an Ionic service.
Could this be accomplished only by gitignoring www/lib folder and platforms, and then running bower install in each dev machine after a new module have been added to the project? or is it more complex than that and we're omitting some important steps to allow the project collaboration without these kind of issues?
Yes, you can put platforms in your .gitignore. I personally wouldn't be putting www/lib folder there, though.
Also, I would strongly advise that on all the machines where you're building the apps locally you have the same version of Ionic and Node.
I saw questions like this in stackoverflow but, answers not satisfied me. My main problem is i have to check how my android sencha application running at various version of android mobiles.
From starting onwards i tested the application in android 2.3.4 mobile, now i almost finished my application so i want to test my application in all the version android, so i trying to run my application in android emulator.
I ran the application but only got error, so i searched for how to run android sencha application in emulator, then i got this link Sencha Touch 2 Native Packaging for Android, i tried to follow guide in that link, i installed SenchaSDKTools 2.0 and Sencha Cmd.
and tried to run
sencha package run android.json
this what i got
Sencha Cmd v3.0.0.250
[ERR] stbuild is not yet supported on linux
I am using ubuntu 12.4.
To run sencha application on Android, you required cordova integration which will provide a bridge between sencha and android.
I have already posted details steps for such things.
Please see this link.
Integrate Phonegap/Cordova with Android Application
Follow those steps and you are done.
Just consider 5th step there, you need to place whole your sencha app code into assets/www folder and make sure index.html is in the root(www) folder.
Thanks.