Cordova app-release-unsigned.apk not working - android

My Cordova-generated app-debug.apk installs and works perfectly.
But when I then create my app-release-unsigned.apk using the cordova build android --release command, the release apk doesn't even install. I'd like to install and check the release apk before adding security software to it, signing it and then publishing it.
Is there something I need to do AFTER creating my app-debug.apk but BEFORE I use the cordova build android --release command?
I'm using the latest versions of Cordova and Android.
Thanks.

You can only install signed apps on an android device.
Even a debug version of an app is signed with a debug key. You will need to sign your APK with apksigner after you generate it.

Related

App not installed error in all devices in ionic 5 version?

I have properly generated the release build in ionic 5 but its install in every device but i got “App not installed issue in every device” debugg APK is installed properly but issue in release build. i tried below solutions:
Tried Solutions
In AndroidManifest.xml under the application tag add **testOnly="false" and android:debuggable="true"
In AndroidManifest.xml under the application tag android:usesCleartextTraffic="true"
Can anynody help me how to fix above issue?
I also had same issue for android platform.
Possibilty 1
Normally it happens when you try to install release .apk on the device(Mobile) where debug .apk is already installed.
I recommend you should remove debug apk first and try to install release apk.
Possibilty 2
Check if you have signed the release apk with the correct keystore.
Get more idea about apk signing here,
https://developer.android.com/studio/publish/app-signing
After 2 days of struggle today i finally fixed my issue and i follow below procedure:
1 – Build release unsigned apk.
2 – Zip align unsigned APK using the command prompt.
zipalign -v -p 4 my-app-unsigned.apk my-app-unsigned-aligned.apk
3 – Sign the APK with apsigner-
apksigner sign --ks my-release-key.keystore --out app-release.apk my-app-unsigned-aligned.apk
I am not using jarsigner command and becasue generated same issue then i will skip that cmd and follow above procedure.

Debug android application by upgrading production(signed) apk

I can download my old apk(s) as signed apk(s) from Google Play.
I have latest version of my app on android studio.
I want to debug SQLiteOpenHelper onUpgrade method so I need to upgrade the apk but I do not have old apk signed with debug key.
So when I install old production apk and want to debug from Android Studio I get INSTALL_FAILED_UPDATE_INCOMPATIBLE error.
Is there any way to solve this issue?
Thanks,
Baris
PS: Writing some debug information (Log.d()), signing the apk with production, re-install the apk and watch the Android Monitor for debug info is workaround but I want real debug from android studio.

For Android App Release what is difference between Ant build apk vs Android Signed Apk

For Android Application while generating Apk usually use signed apk, what is the use of ant Apk generation?
How to use it for android native apps, where signed apk also is non debug-gable? Then what is the use of ant apk generation?
Build apk is able to debug from any developer also.
If you build signed apk and test that apk it will not connect with debugging.
If you use the system.out then that can be seen in Android Monitor of Android Studio but Log will not be shown.

How to get the updated Apk file from the android studio.?

I am developing an android application. All the things is going well when I run the application into genymotion virtual device.And Since the apk is stored in F:...\app\build\outputs\apk location. So I just want to collect it from this location and download it to install in a android phone.As I simultaneously updating the application with code but this apk doesn't provide me the updated apk file according to the updated code .They just give me the old apk file even if i run my application again and again from the android studio. Can anyone suggest me why this is happening ??? I just want to run this apk into phone or download this apk file for another purpose.
This three steps will do Go build->Build apk
Go to Build > Build APK to generate a normal APK.
Go to Build > Generate Signed APK to generate signed APK.
Signed APK are those which we generate to release our application. Here it is, why is it necessary to generate signed APKs: Why should I Sign my Application APK before release
If you build a debug APK, it will still work on all devices but you cannot release it.
From terminal run the following command to make sure that you get the updated apk.
1. gradle clean (from windows )
-or-
./gradlew clean (from linux) -
Above command deletes the build folder.
2. gradle build (from windows)
-or-
./gradlew build(from linux)
Above command builds all the flavor for your application.
Edit: Original answer
Signed apk is needed to install in any other non debug device. This will be same as the debug app that runs in your test device/emulator.
Build -> Generate signed apk

Signed APK will be re-compiled when running it with eclipse

Now I'm using ADT18. I had been running singed APK on device by installing APK with eclipse before, with ADT15 or 16. But with ADT18, when I try to run (to install) signed APK, lovely eclipse re-compiles and overwrites signed (exported) APK.
Before I release APK on Google Play, I need to run it on my device. And I want to install it by running it with eclipse. I had been doing this practice over a year. But now I can't with ADT18 and I'm forced to install APK with different way.
How can I tell eclipse not to re-compile my signed APK and just install it and run.
Thanks in advance.

Categories

Resources