APK fails to install the second time - android

I generate APK by doing following in Android Studio:
Build -> Build APK(s).
I copy this APK in Phone's memory and launch it. It installs fine, but only for the first time. I then uninstall existing app and launch the same APK again, now it says "App Not Installed".
If I copy the same APK from my computer to this phone again, then again it installs for the first time only.

Problem with Google play update, Open playstore -> Play protect and turning off Scanning device for security threats.

To run your app on a device, you should plug the device into your development computer with a USB cable. In Android Studio, select the app Run Configuration and click on the Run button. You shouldn't copy the APK directly to the phone. Let Android Studio install it instead. For more details, read Run your app from the official Android documentation.

1) Please Disable Instant Run
(File >Settings >Build,Execution,Deployment > Instant Run)
2) Trying cleaning AND rebuilding your project
3) Make sure that your phone is properly connected to your PC with a USB cable and try to install the app.

I had the same issue after I uninstalled my debug apk from my device. For my case, I solved the problem by "Build" -> "Clear Project" then "Rebuild Project". Then I can install the newly rebuilt apk.

Related

App not installed error when uninstall and install app again

I generated release apk by following this link. For first time generated apk installed on android device successfully. but when i uninstall and install this apk again its showing error App not installed.
Please help :)
Go to settings -> Appliaction Manager and check if your application is showing in the list. Uninstall it properly for all users(if your mobile support multiple users). Then Try to install this again.

unable to install app after uninstalling it

i am working on an app, the app installs fine first time then if i uninstall it from the phone after that the app wont install again until i change package name.
i have tried clearing cache of phone restarting it
when installing app using android studio it gives error like application installation failed installed failed conflicting provider
note that the first time app installs fine these issues are when i try to install it again or update it
and if i change the package name the app installs fine but then again i wont be able to update it
Except above recommendations, also there may be 2 possible reason for that.
1- Your device has another account (Guest account etc.) and your uninstallation not reflected to other account. You can try:
Settings -> Applications -> Find your application from list and Uninstall
2- If it is Play Protect Error
Open Google Play app -> Click Menu and choose Play Protect -> Try disable scan device and Improve harmful detection
This happened with me too. I had solved it by disabling instant run.
File > settings > Build, Execution, Development > Instant Run > disable instant run.
Try running your project again.

After sending APK to other device, application crash

I spend some time writting basic android apps, and I wanted to share it with my friends. I tried both APK Extractor and sending an APK file from project folder. In both cases after installation an app icon and title are visible, but app crashes in the second it is opened. I even tried to do it on my phone. It works perfectly when I'm openning it via Android Studio, but crashes after installation from APK. What can be the problem? Do I need to put some permission somewhere?
EDIT
I needed to build APK one more time. Now it's working, I'll leave it in case someone will have the same problem. Just go to Build>Build APK
Goto File -> Settings -> Build,Execution -> Instant Run and uncheck the "Enable Instant run ..." Option
uncheck option and click apply button

Android Unsigned App not able to install on device

My app able run on simulator and I export it as Unsigned App.
On my phone's Setting-->>Applications--->>Unknown sources checked.
I download the .apk into phone storage through USB.
Then under File Manager, I found that stored .apk and hit install button and it try to install,
But finally it says Application Not installed. but why? wht's wrong?
Also I try ./adb install -r myapp.apk but it said error:device not found
I have never tested an app on a device by using your method... When I am NOT debugging on my device using usb and I just want to install it on my phone, I do the following:
If you have run it on the emulator then there is an .apk file in the bin directory of your project.
Move that .apk to your phone via usb or another method (I use dropbox).
Open the .apk and install on your phone.
The previous answers are correct, it must be signed. But by doing my method it will be signed with your debug key.
You will obviously want to actually sign it with a real key before publishing it to the market.
All applications must be signed in order to install on emulator or real device, check out the official dev guide signing your application:
All applications must be signed. The system will not install an
application on an emulator or a device if it is not signed.
To test and debug your application, the build tools sign your application with a special debug key that is created by the Android
SDK build tools.
Specifically how are you getting the APK to the device? Try dab install <path to APK>. Also, you can install APKs from the Android browser by uploading it to any web server and navigating to its URL.
You must export and sign with a debug certificate before installing. Read about publishing.
If you are using Eclipse, you don't need to export your app as "unsigned apk". Simply enable "Allow Unknown Sources" on the phone, and right click on project and hit "Run As".
Unsigned apks are generated by signing them with the debug.keystore key that's stored in the Android SDK. It could be possible that his key is corrupted. To verify, check to see if any other project also gives a similar problem. To resolve th key corruption, delete your SDK and install again (shouldn't take more than 15mins).
In case other projects work fine, which means your debug.keystorekey is NOT corrupt, you need to uninstall any previous versions of this app on your phone and restart your phone.
It could also be possible that the adb server could be messed up. In that case, restart your Eclipse or do adb kill-server from command line.
Also, seems like other people have faced similar issues. Did you search similar StackOverflow questions and try out the solutions? Here's one: 'App not Installed' Error on Android
Unsigned APK can be installed in real mobile devices for purpose of testing.
Just follow these steps on images:
Locate the APK and send it to your mobile through gmail etc..

unsigned APK can not be installed

I am trying to distribute my application to some people for testing.
I have installed it on my Desire directly from eclipse and it works fine.
To create an APK-file, I choose "Export Unsigned Application Package" directly from eclipse, and then an APK file was created. I emailed it to myself and downloaded the file to the SD-card. But when I try to install it (using ES File Browser), I get a message saying "Application not installed".
(I have already checked the "Allow installation of non-Market application" on my phone)
Any ideas?
Yeah I found the problem, see my answer below:
I did not know that even with the "Allow Installation of non-Marked application", I still needed to sign the application.
I self-signed my application, following this link self-sign and release application, It only took 5 minutes, then I emailed the signed-APK file to myself and downloaded it to SD-card and then installed it without any problem.
I did not know that even with the "Allow Installation of non-Marked application", I still needed to sign the application.
I self-signed my application, following this link self-sign and release application, It only took 5 minutes, then I emailed the signed-APK file to myself and downloaded it to SD-card and then installed it without any problem.
You cannot install an unsigned application on a phone. You can only use it to test with an emulator. If you still want to go ahead, you can try self-signing the application.
Also, since you are installing the application from an SD card, I hope you have the necessary permissions set. Do go through stackoverflow.com and look at questions regarding installation of applications from an SD card - there have been many and they have been asked before.
Hope that helps.
You can test the unsigned-apk only on Emulator. And as its step of application deployment and distribution, you should read this article atleast once, i suggest: http://developer.android.com/guide/publishing/app-signing.html.
For your question, you can find the below line in above article:
All applications must be signed. The system will not install an application that is not signed.
so you have to have signed-apk before the distribution of your application.
To generate Signed-apk of your application, there is a simple wizard procedure, click on File -> Export -> Android -> Export Android application.
Just follow these steps to transfer the apk onto the real device(with debugger key) and which is just for testing purpose. (Note: For proper distribution to the market you may need to sign your app with your keys and follow all the steps.)
Install your app onto the emulator.
Once it is installed goto DDMS, select the current running app under the devices window. This will then show all the files related to it under the file explorer.
Under file explorer go to data->app and select your APK (which is the package name of the app).
Select it and click on 'Pull a file from the device' button (the one with the save symbol).
This copies the APK to your system. From there you can copy the file to your real device, install and test it.
Good luck !
I cannot install an apk build with "Export Unsigned Application Package" Android SDK feature, but i can install an apk browsing the bin directory of my project after the project buid. I put this apk on my sd on my HTC Wildfire phone, select it and the application install correctly.
You need to allow your phone to install unsigned apk.
Good Luck.
You could also send your testers the apk that is signed with your debug key. You can find that in the bin folder of your project after building in debug mode.
An unsigned application cannot be installed. When we run directly from eclipse, that apk is signed with debugger key and can be found in bin\ folder of the project. You can use that for test purpose distribution also.

Categories

Resources