Cordova app deployment on device - android

I'm using Eclipse to run my android mobile app. The problem is that when modify code the change not appear in the deployed app on device. Remain ever the same app on device.

If you are changing code in yourProject->www folder, then you need to build it first with command prompt /cli
OR you need to directly change the files in yourProject->platforms->...->www before running from Eclipse

Related

Ionic 4 - install run performed a full build and install since the installation on device does not match the local build on disk

Im trying to generate an APK to test my android build, it used to work before, i dont know what went wrong that it stopped working, whenever i try to run on device either on android studio or my own device, it does not build even though its error clean. App actually installs, but when its about to run it closes down and this message appears
Heres what i got from checking the logcat on Android Studio: https://imgur.com/a/FdE4WMo
Try uninstalling the app from the device and then run it again.
The dev / debug build uses an encryption key that's specific to the machine so I think that maybe you are trying to install a different app over the original one?

phonegap emulate android , app not installed , how to initialize android simulator

I use phonegap build a app,and run phonegap emulate android, and I uninstall the app .
The next time I try to phonegap run android, It'll still open the same android , which the app uninstalled . That way , I can find the app, I mean how to initialize android simulator and debug the app again?
In one words , how to update the app on the android emulator?
In your command prompt
you can see which devices/emulators connected to your system using
adb devices
you can open avd-manager using
android avd
To start on configure new avd-emulator using cmd check this
I would say open up the Android emulator and uninstall the application like you would any Android app - using Android's native uninstall method. Ensure that you don't have differently (re)named versions of your app, and ensure you have them ALL uninstalled.
phonegap run android will run the same code base on Android each and every time, unless you update the code. Once you update the code and type phonegap run android again, it should run the updated code base.
At worst, reset your Android emulator.

See app changes in real time on real device

I have Eclipse with Android Development Kit (ADT) installed, and also SDK. I have connected my Venue7 tabled and enabled USB Debugging.
I've created a simple Hello World app and ran it on my Venue7.
Now is it possible to update the app via Eclipse and see the result #Venue7 in real time? Or do you I have to stop the app and start it again after each change?
When you install your program on your device you are doing just that - installing it. The .apk file you have there is an installation package (apk stands for android package) not an executable file. So yes you have to reinstall it each time you have made changes to the program.
On eclipse I believe you just click the run as android program as the other poster said.
If you are using for the first time, Just see the left side, in package explorer, right click on your package- Select Run As Android application.
You dont need to stop an app. Just Run it from eclipse
If you have made changes in source code and you want to see the effects, you no need to stop the app/device or emulator. But you need to re-run the package again.
You can do this by 2 ways:
Right-click project, run as Android application
CTRL+F11 is to run the application. But for this you have to apply pre-settings as below.
Windows>Preferences>Run/debug > Launching : Launch Operation; "Always launch the previously launched application"

Phonegap Build in Dreamweaver CS6 - old project runs in emulator instead of current one

I created four or five little test Android apps in Dreamweaver CS6 using PhoneGap Build. Each time, the current app would run in the emulator. Now, instead of running the project in the current site, the emulator64-arm keeps running a previous project when I click the PhoneGap Build icon on the Android emulator home screen. I have tried deleting all my projects from build.phonegap.com, and deleting all but the most recent project from the local drive. Even so, the emulator runs the old project -- which as far as I know, doesn't even exist anymore, either locally or on build.phonegap.com! Do I need to delete the project from the emulator? If so, how would I do that? Any help will be greatly appreciated, cause I'm stumped!
Mac OS X 10.6.8
Mystery solved. The first few times I installed apps on the emulator, I clicked the PhoneGap Build icon to run them. But later appps installed under different names -- I guess based on info I entered into the config.xml file.
Still would be nice to know how to delete those apps from the emulator. But at least the really mysterious part is explained -- why it ran a different app from the one I just built. I was just clicking on the wrong icon.

Installing phonegap app to android emulator using windows CLI

I'm trying to install my Phonegap application onto an Android AVD/Emulator. I have launched the AVD and it's registering as 5554:Nexus_S.
When using the Phonegap commands at the Windows prompt I am typing:
phonegap build android
phonegap install android
The output I get says it successfully installed the app onto the device, but it never shows up. This is the output of the install command:
[phonegap] detecting Android SDK environment...
[phonegap] using the local environment
[phonegap] trying to install app onto device
cp: dest file already exists: C:\Users\username\app\platforms\android\assets\www\phonegap.js
[phonegap] successfully installed onto device
I've tried variations of targeting the device using options with no luck:
--device=5554
--target=5554
Any ideas?
I figured it out. You have to specify the --emulator= in the call, so the command looks like:
phonegap install --emulator=emulator-5554 android
You can find the name/id of your running emulators by running the list-started-emulators.bat under the /platforms/android/cordova/lib/ folder in your project.
Another quick note is that sometimes even when you have started the emulator phonegap will not recognize it... so you have to start it from phonegap bat file so that the right process number is registered. to do this.
Use the following command,
1. List-emulator-images.bat : This will display available emulator images you have
2. start-emulator : This will start the emulator which will register with phonegap.
Also make sure you are running all of this from and ADMIN Enabled command prompt.
Okay, I've solved my problem. This solution may not be applied to all, but I was suffering from the same problem as I've mentioned in the comments of the question.
What did I do wrong?
I made some changes in one of the plugins.
I was working on my app and added the Vibration plugin. I made some changes in the plugin, both in the generic version [your_project_root\plugins\org.apache.cordova.vibration\src\android\Vibration.java] and also in the platform specific version [your_project_root\platforms\android\src\org\apache\cordova\vibration\Vibration.java].
But when I reverted the changes back, everything went fine.
I say it again, this solution may not be generic but can be useful for at least my type of problem.
And this gives rise to another question, can't we make changes in the Plugins?I think it is totally fine to make changes in them. Maybe I had done something wrong.

Categories

Resources