Phonegap Unable to Install the apk file on android - android

I have recently got the following error while installing PhoneGap build apk on phone or emulator
pkg: /data/local/tmp/android-debug.apk
Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]
Then I found the reason for it is due to signatures of the build app So then I uninstalled my android studio and Updated my Node js. Now I can install it on Emulator but not the phone Still I am getting the same error.
I have already gone through the solution available on the Internet including INSTALL_FAILED_UPDATE_INCOMPATIBLE when I try to install compiled .apk on device
With help of available solutions, I can install in Emulator but not in my when phone and I don't have any previous versions of the app to uninstall the app
Still, I have no clue how to solve this error.
Please help to how to solve it.

Yes, I solved my Problem.
The problem If you have Android Studio, and PhoneGap installed in the same system the Signature key Generated by Android Studio will make your build app by Phonegap, leads to the problem mentioned above. To solve this one, Uninstall all the Android studio, Phonegap New Desktop application, and CLI and reinstall only PhoneGap then the problem is solved.
Hope this helps you.

Related

Is there any difference on building apk in Ubuntu vs Windows

I have issue. First I was use Windows10. I change my mind 1 years later and I using ubuntu. I building app-debug.apk in Ubuntu but not work on my devices. I encounter with two error Sometimes block by play protect, sometimes the package conflicts with an existing package by the same name. But when i open Windows10 and building app-debug.apk there is no issue Have you ever solution this issue?
Try disabling the instant run in android studio. It causes lot of errors.

Android studio - not able to install apk

I am trying to install apk from android studio. Initially I got below error:
So I disable instant run as suggested in many post on stackoverflow like this How To Stop Installation of Multiple Slice APK In Android Studio 2.3.
Now I am getting below error after disabling instant run:
java.io.IOException: An established connection was aborted by the
software in your host machine Error while Installing APK
I have only one instance of android studio running when I got this error.
Android studio version is 3.3.1. What can be cause of above error.
Also I am not able to install apk using adb install command. I am getting message failed to install apk with no detail message.
You can restart Android Studio : File -> Invalidate caches/restart
And i think you install ADB-Idea pluggin to uninstall or clear app data very easy with shortcut.
ADB-Idea pluggin :
Link
So I found out why I was not able to install apk from studio or from adb install command. Issue was due to my pc usb port was blocked by network administrator of our organization as my usb port usage period expired. So if anyone facing issue of not able to install apk and getting error as mentioned in question and no solution working for you than please check if your pc ports are not blocked by your organization network admin. I took approval to use usb port and it is working now.
You have got the first error because of :
You are testing your project_A on a emulator_E
As you had the app project_A, installed on the emulator_E, in previous run.
Now you started the execution of your project_A, again on the emulator_E.
The Android_Studio and emulator_E, both came to know that, the apk is already on the emulator_E, so just, whatever the new changes are, will be synchronised, within the, already available project_A apk, on the emulator_E.
But as the whole process takes some time, you uninstalled the apk of project_A on a emulator_E.
And now project_A on a emulator_E is not there, but Android_Studio tried to synchronised it, which leads you to the ERROR_1
Solution
You are following many approaches, for the same thing.
You are starting your project, project_A on the emulator_E by :-
via ADB INSTALL from the command line too
With Instant Run too
With Instant Run too
And you are not keeping the previous apk as it is there on the emulator_E, after starting the execution too.
Uninstall it from emulator_E, but before you start the execution for emulator_E. Which lead to your Android Studio to some dangerous STATE_A and, Android Studio is not tested by google for such types users
It may seem harsh, and obviously it is not the answer, but this is the exact problem, which is leading you to the such case.

Android APK not getting installed

I created a basic Android app as an Internship. Created its APK and tried to run on my mobile by connecting it to the Laptop by USB cable and used as an emulator, it's working perfectly. My Android OS version is Oreo, I tried the same to do on Lollypop and still it's getting executed.
The problem arrives when I am sending that APK via e-mail and trying to directly install on the device, it's giving me this error
There was Problem in Parsing the Package
I don't know what is happening as it is getting executed directly from Android Studio.I kept minimum SDK as 15.
Please help me out.
Here is what you need to do before installing.
Android Unsigned App not able to install on device
And I hope answers here do the help too.
Cannot install signed apk to device manually, got error "App not installed"
Try this:
Build --> Clean Project
Build --> Rebuild Project
Build --> Build APK(s)
Apk Dir: Project Dir/app/build/outputs/apk/debug/xxx.apk
or check your app name length.

Failure to install APK [INSTALL_FAILED_DEXOPT] Android Studio

I have tried literally everything to try and rectify this error when trying to deploy an app to an actual android device for debugging but have been unable to solve the matter. Everytime I try to launch I get a failed [INSTALL_FAILED_DEXOPT] error and when checking the logcat it is always because there is no classes.dex in my debug apk.
If I run gradlew.bat clean assembleDebug, there is no difference in the apk size so I'm assuming there is a build error in android studio. I am using android studio beta 0.86 and have tried it on 0.89 with the same result. I have tried build tools for 19.1 to 21 with no result. I have also tried different devices and created a new project (that has never been installed on my devices) and android studio seems to think it needs to be uninstalled first when attempting to deploy.
I have tried switching my device to ART, uninstalling and reinstalling android studio, redownloading the sdk and restarting my computer. NOTHING and I mean NOTHING has worked. I think the problem started after I downloaded the lollipop apis but am not sure. I have tried uninstalling all apps with my package signature on my device but NOTHING works! Not even Project -> Clean Project -> Rebuild
This is extremely frustrating as I cannot debug my apps anymore :/ has anyone had any experience with this error or ways to rectify it?
So turns out that the issue was mismatching sdks between Android Studio and the Project. The project was using an old sdk and once I made them the same, I cleaned and rebuilt the project and everything was good to go.
UPDATE:
I ran into the problem again after I tried to update my SDK and its tools. Turns out that when you try to do this, the SDK locks the tools folder and then you get an error saying some file couldn't be overridden. When this happened to me, all the build tools were deleted so there were errors in the .dex file created when debuggin my app.
We are using android 2.2 (really old i know) and couldn't find a fix for this error. Eventually we found this bug https://android-review.googlesource.com/#/c/30900/. The only solution for us was to remove some libraries...
I kept having the same problem - manually building worked fine, but Android Studio would not build a proper APK.
The problem was that I started the project on Android Studio and Android Gradle plugin version 2.0-beta2. After updating the Gradle plugin to 2.0-beta6 through a simple build.gradle change, the builds stopped working.
Turns out that, although I installed a beta version of Android Studio, the update checker only checked the stable channel. After setting the updater to check the canary channel as well, I was able to upgrade Android Studio to version 2.0-beta6 and builds continued to work normally.
You can change the update preference in Android Studio settings under Appearance and Behavior -> System Settings -> Updates.
I encountered this error when storage of the device is full. Try to open some space.
Try run these commands
adb reconnect
adb reconnect device

Parse Error : There is a problem_ parsing the package(after signing the Android application)

I am getting the Parse error after downloading and while installing the apk file of my app on Android phones.
Before signing the app works fine on device.
Signing done from Eclipse Export wizard
Unknown Sources is checked in Settings >Security
Could you please suggest a possible solution for this.
Guys whoever is reading this post.....
I have solved this problem by re installing Eclipse and the SDK, ADT plugin etc.
My eclipse had some low memory issue and removing and reinstalling worked for me :)

Categories

Resources