'App not Installed' Error on Android - android

I have a program working in the Android Emulator. Every now and again I have been creating a signed .apk and exporting it to my HTC Desire to test. It has all been fine.
On my latest exported .apk I get the error message 'App not installed' when I try to install the .apk. It runs fine on the emulators.
As I have mainly been testing on the emulators and only every now and again exporting to a real phone I am not sure when this happened. What is the likely cause of it not installing on a physical phone but running fine in the emulators?
I have tried rebooting the phone & removing the existing .apk, does not fix the fault.

Primarily for older phones
I only encountered the App not installed error when trying to install an apk on my phone which runs on 4.4.2 aka KitKat, but my friend did not encounter this error on his phone which runs on 6+. I tried the other solutions such as removing the old/debug version of the app because the apk was a release version, clearing the debug app's data, and even clearing all of my cached data. Then, finally I realized all I had to do was select both signature versions when building my signed apk.
Before I only had V2 (Full APK Signature) selected, but after selecting V1 Jar Signature as well, I was able to successfully install my signed APK on my 4.4.2 device.

For me, On Android 9 (API 28), disabling Google Play Protect from play store app worked the trick, and i was able to get rid of the App not Installed error.
To disable Google Play Protect. Open "Play Store" application => tap
on Menu button => select "Play Protect" option => Disable the options
"Scan device for security threats".

I had a similar issue and it was because I was trying to install an apk on a phone with a previous version of the same apk, and both apks hadn't been signed with the same certificate. I mean when I used the same certificate I was able to overwrite the previous installation, but when I changed the certificate between versions, the installation was not possible. Are you using the same certificate?

Clearly there are many causes of this problem. For me the situation was this: I had deployed to my nexus 7 (actual device) from within the Android Studio (v1.3.2). All worked fine. I then created a signed apk and uploaded to my Google Drive. After disconnecting my nexus from the usb, I went to the settings/apps and uninstalled my app (App1). I then opened google drive and clicked on my App1.apk and chose to install it (need to ensure you have allowed installation of apks in settings). Then I got the dreaded message "App not Installed"
Solution for me: go back into settings/apps and scroll though all apps and at the bottom was a pale version of my App1 (note the original App1 was at the top in Alphabetical order which was deleted as above). When clicking on the pale version it said "Not installed for this user". (I had set up my nexus to have more than one user). But in the top right corner there is a three dot button. I pressed this and it said "Uninstall for all users". Which I did and it fixed the problem. I was now able to click on App1.apk and it installed fine without the error.

I faced the issue when I update my android from 2.3.2 to 3.0.1 . If this is the case the IDE will automatically considers the following points.
1.You cannot install an app with android:testOnly="true" by conventional means, such as from an Android file manager or from a download off of a Web site
2.Android Studio sets android:testOnly="true" on APKs that are run from
if you run your app directly connecting the device to your system, apk will install and run no problem.
if you sent this apk by copy from build out put and debug folder it will never install in the device.
Solution :go Build ---> Build APK(s) ---> copy the apk file share to your team
then your problem will solve.

In my case I had the declared my launcher activity as android:exported="false"
<activity android:name=".MainActivity"
android:exported="false">
I recently targeted android 12 and had to put android:exported attribute in my manifest components, but did not know what to put as the value. changing the value to android:exported="true" worked.

I faced with the same problem. The problem was the main activity in my AndroidManifest.xml file was written twice. I deleted the duplicate.

For those who are using Android Studio 3.
Suryanarayana Reddy's Answer is correct thought it doesn't state steps to solve it, hence.
in your AndroidManifest.xml under the application tag add testOnly="false" and android:debuggable="true" like so:
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme"
android:testOnly="false"
android:debuggable="true"
>
Edit then in AndroidStudio's menubar Build > Build APK(s)

This can happen if you have your MainActivity declared twice in your AndroidManifest.xml.
Another possible reason: you changed the launch activity. Hint: never do it with already published applications! Reasons discussed in Android Developers blog.

I had the same problem. I did not realise that an app must be signed even for testing.
After self signing it, it installed fine.

My problem was: I used the Debug Apk, that was generated while I did the Run command from Android Studio
Solution was: Instead of using this file, clean project and click Build > Build APK(s) from Android Studio. Then you can use the generated APK from the usual folder (app/build/outputs/apk/debug/)
The file that was generated like this installed without a problem.

I had the same problem and here is how solved it : Go to the Manifest file and make sure you have the "Debuggable" and the "Test Only" attributes set to false. It worked for me :)

I had the same issue, i.e. App showed up as being installed, but would not launched when the icon was tapped. After some head-banging, I found that I had stupidly placed ' android:exported="false" ' for my main launcher activity within the AndroidManifest file.... Once I removed it, the App launched fine..

I know this is an old post, but for new users may be useful. I had the same problem: my application worked fine while debbuging. When I signed the APK I got the same message: "Application not installed".
I fixed that uninstalled my JDK (I was using jdk-6u14-windows-x64) and installed a new one (jdk-6u29-windows-x64). After export and sign the APK again, everything was ok!
Resuming, my problem was in JAVA version. Thank's Oracle!!

My problem was that I have multiple user accounts on the device. I deleted the app on 1 account, but it still was installed on the other account. Thus the namespace collided and did not install. Uninstalling the app from all user fixed it for me.

I faced a similar issue today and at first i thought it was my sd card which corrupted it. I tried it on many devices running android 4.4 and up but it kept bringing the same issue.After some googling and research i realized that i didn't select the v1 jar signature which is for devices older than android 7.0 nougat so i applied both of these signatures by selecting the two check boxes and generated a signed apk and it worked.
Link to solution Android – App not installed error when installing a signed APK – How to Fix

Sideloading debug apps for testing on a physical phone worked reliably until I upgraded the phone from Android Pie to Android 10. After that, the "App not installed" error came up every time I tried to sideload the app.
Based on a warning in my AndroidManifest.xml, I changed from...
<application
android:name=".App"
android:allowBackup="true" ... />
to...
<application
android:name=".App"
android:allowBackup="false" ... />
After that, I was able to sideload my app -- once. Then, I encountered the same "App not installed" error again. By changing allowBackup back to true, it worked again (at least once).
It is obvious from the number of answers and the variation in the answers that there are many reasons for this problem. I'm sharing this in case it helps others.

If you have a previous version for that application try to erase it first, now my problem was solved by that method.

If application's not installing, delete the file .android_secure/smdl2tmpl.asec from the SD card.
If the folder .android_secure is empty in the file manager, delete it from the PC.

ARGHHHHH! I was trying to install as Unsigned Release APK when the proper setting was DEBUG SDK.
There goes an hour.

In the end I found out that no apps were being installed successfully, not just mine. I set the Install App default from SD card to Automatic. That fixed it.

create keystore file through command line
keytool -genkey -alias key_file_name.keystore -keyalg RSA -validity 1000000000000000 -keystore key_file_name.keystore
export apk through Eclipse, right click on Android project Android Tools > Export Signed Application Package, then give keystore location & password.
this will crate signed apk at the same time apk will be zipaligned. And installable.
If you go through command line for all, some times you may face "Application not installed" error.
(Application not installed error can happen not only, when using command line. It can be some other reasons as well)

Using Android Studio, I had previously installed the unsigned debug version of the APK (Build > Build APK) and had to uninstall it before installing the signed release version (Build Variants > Build Variant: release, Build > Generate Signed APK).

I have also solved this issue,
The problem was that i declared my main activity twice,
On as the first activity to load and i specified also an intent-filter for it
And once again below it i declared it again .
Just make sure you don't declare your activities twice .

My problem was similar to that of #Lunatikzx. Because of wrong permission tag which was written as attribute to application:
<application
android:permission="android.permission.WRITE_EXTERNAL_STORAGE"
android:label="#string/app_name"
android:icon="#drawable/ic_launcher"
android:testOnly="false"
android:debuggable="true">
What fixed it for me was changing permission tag to separate tag like this:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

Apparently this can also be caused by renaming the APK prior to installing it. I wanted to reduce the amount of typing users had to do to get the app from our web site by shortening the file name. After that, they were unable to install it.
Once I reverted to the original file name used when creating and signing the package I was able to update the installed app.

In my case it was because I was using the alpha version of support library 28. Looks like Google marks these pre release versions as testOnly. If you really want to release like this (for instance, you want to push an internal beta like I did), you can add this line to your gradle.properties file:
android.injected.testOnly=false

Check with the Android version.
If you are installing non-market apps, and incompatible version you will get this error.
Ex: Application targetted to 2.3.4
Your device is 2.2
Then you will get this error.

The "Application not installed" error can also occur if the app has been installed to or moved to the SD card, and then the USB cable has been connected, causing the SD card to unmount.
Turning off USB storage or moving the app back to internal storage would fix the issue in this case.

I also encountered this issue.
Kindly try this solution. Make sure that the package name of your project is different from your previous project that was already installed in your mobile phone. I think they get conflict in their names. It works in me.

Related

App not installed? [duplicate]

I have a program working in the Android Emulator. Every now and again I have been creating a signed .apk and exporting it to my HTC Desire to test. It has all been fine.
On my latest exported .apk I get the error message 'App not installed' when I try to install the .apk. It runs fine on the emulators.
As I have mainly been testing on the emulators and only every now and again exporting to a real phone I am not sure when this happened. What is the likely cause of it not installing on a physical phone but running fine in the emulators?
I have tried rebooting the phone & removing the existing .apk, does not fix the fault.
Primarily for older phones
I only encountered the App not installed error when trying to install an apk on my phone which runs on 4.4.2 aka KitKat, but my friend did not encounter this error on his phone which runs on 6+. I tried the other solutions such as removing the old/debug version of the app because the apk was a release version, clearing the debug app's data, and even clearing all of my cached data. Then, finally I realized all I had to do was select both signature versions when building my signed apk.
Before I only had V2 (Full APK Signature) selected, but after selecting V1 Jar Signature as well, I was able to successfully install my signed APK on my 4.4.2 device.
For me, On Android 9 (API 28), disabling Google Play Protect from play store app worked the trick, and i was able to get rid of the App not Installed error.
To disable Google Play Protect. Open "Play Store" application => tap
on Menu button => select "Play Protect" option => Disable the options
"Scan device for security threats".
I had a similar issue and it was because I was trying to install an apk on a phone with a previous version of the same apk, and both apks hadn't been signed with the same certificate. I mean when I used the same certificate I was able to overwrite the previous installation, but when I changed the certificate between versions, the installation was not possible. Are you using the same certificate?
Clearly there are many causes of this problem. For me the situation was this: I had deployed to my nexus 7 (actual device) from within the Android Studio (v1.3.2). All worked fine. I then created a signed apk and uploaded to my Google Drive. After disconnecting my nexus from the usb, I went to the settings/apps and uninstalled my app (App1). I then opened google drive and clicked on my App1.apk and chose to install it (need to ensure you have allowed installation of apks in settings). Then I got the dreaded message "App not Installed"
Solution for me: go back into settings/apps and scroll though all apps and at the bottom was a pale version of my App1 (note the original App1 was at the top in Alphabetical order which was deleted as above). When clicking on the pale version it said "Not installed for this user". (I had set up my nexus to have more than one user). But in the top right corner there is a three dot button. I pressed this and it said "Uninstall for all users". Which I did and it fixed the problem. I was now able to click on App1.apk and it installed fine without the error.
I faced the issue when I update my android from 2.3.2 to 3.0.1 . If this is the case the IDE will automatically considers the following points.
1.You cannot install an app with android:testOnly="true" by conventional means, such as from an Android file manager or from a download off of a Web site
2.Android Studio sets android:testOnly="true" on APKs that are run from
if you run your app directly connecting the device to your system, apk will install and run no problem.
if you sent this apk by copy from build out put and debug folder it will never install in the device.
Solution :go Build ---> Build APK(s) ---> copy the apk file share to your team
then your problem will solve.
In my case I had the declared my launcher activity as android:exported="false"
<activity android:name=".MainActivity"
android:exported="false">
I recently targeted android 12 and had to put android:exported attribute in my manifest components, but did not know what to put as the value. changing the value to android:exported="true" worked.
I faced with the same problem. The problem was the main activity in my AndroidManifest.xml file was written twice. I deleted the duplicate.
For those who are using Android Studio 3.
Suryanarayana Reddy's Answer is correct thought it doesn't state steps to solve it, hence.
in your AndroidManifest.xml under the application tag add testOnly="false" and android:debuggable="true" like so:
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme"
android:testOnly="false"
android:debuggable="true"
>
Edit then in AndroidStudio's menubar Build > Build APK(s)
This can happen if you have your MainActivity declared twice in your AndroidManifest.xml.
Another possible reason: you changed the launch activity. Hint: never do it with already published applications! Reasons discussed in Android Developers blog.
I had the same problem. I did not realise that an app must be signed even for testing.
After self signing it, it installed fine.
My problem was: I used the Debug Apk, that was generated while I did the Run command from Android Studio
Solution was: Instead of using this file, clean project and click Build > Build APK(s) from Android Studio. Then you can use the generated APK from the usual folder (app/build/outputs/apk/debug/)
The file that was generated like this installed without a problem.
I had the same problem and here is how solved it : Go to the Manifest file and make sure you have the "Debuggable" and the "Test Only" attributes set to false. It worked for me :)
I had the same issue, i.e. App showed up as being installed, but would not launched when the icon was tapped. After some head-banging, I found that I had stupidly placed ' android:exported="false" ' for my main launcher activity within the AndroidManifest file.... Once I removed it, the App launched fine..
I know this is an old post, but for new users may be useful. I had the same problem: my application worked fine while debbuging. When I signed the APK I got the same message: "Application not installed".
I fixed that uninstalled my JDK (I was using jdk-6u14-windows-x64) and installed a new one (jdk-6u29-windows-x64). After export and sign the APK again, everything was ok!
Resuming, my problem was in JAVA version. Thank's Oracle!!
My problem was that I have multiple user accounts on the device. I deleted the app on 1 account, but it still was installed on the other account. Thus the namespace collided and did not install. Uninstalling the app from all user fixed it for me.
I faced a similar issue today and at first i thought it was my sd card which corrupted it. I tried it on many devices running android 4.4 and up but it kept bringing the same issue.After some googling and research i realized that i didn't select the v1 jar signature which is for devices older than android 7.0 nougat so i applied both of these signatures by selecting the two check boxes and generated a signed apk and it worked.
Link to solution Android – App not installed error when installing a signed APK – How to Fix
Sideloading debug apps for testing on a physical phone worked reliably until I upgraded the phone from Android Pie to Android 10. After that, the "App not installed" error came up every time I tried to sideload the app.
Based on a warning in my AndroidManifest.xml, I changed from...
<application
android:name=".App"
android:allowBackup="true" ... />
to...
<application
android:name=".App"
android:allowBackup="false" ... />
After that, I was able to sideload my app -- once. Then, I encountered the same "App not installed" error again. By changing allowBackup back to true, it worked again (at least once).
It is obvious from the number of answers and the variation in the answers that there are many reasons for this problem. I'm sharing this in case it helps others.
If you have a previous version for that application try to erase it first, now my problem was solved by that method.
If application's not installing, delete the file .android_secure/smdl2tmpl.asec from the SD card.
If the folder .android_secure is empty in the file manager, delete it from the PC.
ARGHHHHH! I was trying to install as Unsigned Release APK when the proper setting was DEBUG SDK.
There goes an hour.
In the end I found out that no apps were being installed successfully, not just mine. I set the Install App default from SD card to Automatic. That fixed it.
create keystore file through command line
keytool -genkey -alias key_file_name.keystore -keyalg RSA -validity 1000000000000000 -keystore key_file_name.keystore
export apk through Eclipse, right click on Android project Android Tools > Export Signed Application Package, then give keystore location & password.
this will crate signed apk at the same time apk will be zipaligned. And installable.
If you go through command line for all, some times you may face "Application not installed" error.
(Application not installed error can happen not only, when using command line. It can be some other reasons as well)
Using Android Studio, I had previously installed the unsigned debug version of the APK (Build > Build APK) and had to uninstall it before installing the signed release version (Build Variants > Build Variant: release, Build > Generate Signed APK).
I have also solved this issue,
The problem was that i declared my main activity twice,
On as the first activity to load and i specified also an intent-filter for it
And once again below it i declared it again .
Just make sure you don't declare your activities twice .
My problem was similar to that of #Lunatikzx. Because of wrong permission tag which was written as attribute to application:
<application
android:permission="android.permission.WRITE_EXTERNAL_STORAGE"
android:label="#string/app_name"
android:icon="#drawable/ic_launcher"
android:testOnly="false"
android:debuggable="true">
What fixed it for me was changing permission tag to separate tag like this:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Apparently this can also be caused by renaming the APK prior to installing it. I wanted to reduce the amount of typing users had to do to get the app from our web site by shortening the file name. After that, they were unable to install it.
Once I reverted to the original file name used when creating and signing the package I was able to update the installed app.
In my case it was because I was using the alpha version of support library 28. Looks like Google marks these pre release versions as testOnly. If you really want to release like this (for instance, you want to push an internal beta like I did), you can add this line to your gradle.properties file:
android.injected.testOnly=false
Check with the Android version.
If you are installing non-market apps, and incompatible version you will get this error.
Ex: Application targetted to 2.3.4
Your device is 2.2
Then you will get this error.
The "Application not installed" error can also occur if the app has been installed to or moved to the SD card, and then the USB cable has been connected, causing the SD card to unmount.
Turning off USB storage or moving the app back to internal storage would fix the issue in this case.
I also encountered this issue.
Kindly try this solution. Make sure that the package name of your project is different from your previous project that was already installed in your mobile phone. I think they get conflict in their names. It works in me.

Install error when trying to update android application programmatically [duplicate]

I have a program working in the Android Emulator. Every now and again I have been creating a signed .apk and exporting it to my HTC Desire to test. It has all been fine.
On my latest exported .apk I get the error message 'App not installed' when I try to install the .apk. It runs fine on the emulators.
As I have mainly been testing on the emulators and only every now and again exporting to a real phone I am not sure when this happened. What is the likely cause of it not installing on a physical phone but running fine in the emulators?
I have tried rebooting the phone & removing the existing .apk, does not fix the fault.
Primarily for older phones
I only encountered the App not installed error when trying to install an apk on my phone which runs on 4.4.2 aka KitKat, but my friend did not encounter this error on his phone which runs on 6+. I tried the other solutions such as removing the old/debug version of the app because the apk was a release version, clearing the debug app's data, and even clearing all of my cached data. Then, finally I realized all I had to do was select both signature versions when building my signed apk.
Before I only had V2 (Full APK Signature) selected, but after selecting V1 Jar Signature as well, I was able to successfully install my signed APK on my 4.4.2 device.
For me, On Android 9 (API 28), disabling Google Play Protect from play store app worked the trick, and i was able to get rid of the App not Installed error.
To disable Google Play Protect. Open "Play Store" application => tap
on Menu button => select "Play Protect" option => Disable the options
"Scan device for security threats".
I had a similar issue and it was because I was trying to install an apk on a phone with a previous version of the same apk, and both apks hadn't been signed with the same certificate. I mean when I used the same certificate I was able to overwrite the previous installation, but when I changed the certificate between versions, the installation was not possible. Are you using the same certificate?
Clearly there are many causes of this problem. For me the situation was this: I had deployed to my nexus 7 (actual device) from within the Android Studio (v1.3.2). All worked fine. I then created a signed apk and uploaded to my Google Drive. After disconnecting my nexus from the usb, I went to the settings/apps and uninstalled my app (App1). I then opened google drive and clicked on my App1.apk and chose to install it (need to ensure you have allowed installation of apks in settings). Then I got the dreaded message "App not Installed"
Solution for me: go back into settings/apps and scroll though all apps and at the bottom was a pale version of my App1 (note the original App1 was at the top in Alphabetical order which was deleted as above). When clicking on the pale version it said "Not installed for this user". (I had set up my nexus to have more than one user). But in the top right corner there is a three dot button. I pressed this and it said "Uninstall for all users". Which I did and it fixed the problem. I was now able to click on App1.apk and it installed fine without the error.
I faced the issue when I update my android from 2.3.2 to 3.0.1 . If this is the case the IDE will automatically considers the following points.
1.You cannot install an app with android:testOnly="true" by conventional means, such as from an Android file manager or from a download off of a Web site
2.Android Studio sets android:testOnly="true" on APKs that are run from
if you run your app directly connecting the device to your system, apk will install and run no problem.
if you sent this apk by copy from build out put and debug folder it will never install in the device.
Solution :go Build ---> Build APK(s) ---> copy the apk file share to your team
then your problem will solve.
In my case I had the declared my launcher activity as android:exported="false"
<activity android:name=".MainActivity"
android:exported="false">
I recently targeted android 12 and had to put android:exported attribute in my manifest components, but did not know what to put as the value. changing the value to android:exported="true" worked.
I faced with the same problem. The problem was the main activity in my AndroidManifest.xml file was written twice. I deleted the duplicate.
For those who are using Android Studio 3.
Suryanarayana Reddy's Answer is correct thought it doesn't state steps to solve it, hence.
in your AndroidManifest.xml under the application tag add testOnly="false" and android:debuggable="true" like so:
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme"
android:testOnly="false"
android:debuggable="true"
>
Edit then in AndroidStudio's menubar Build > Build APK(s)
This can happen if you have your MainActivity declared twice in your AndroidManifest.xml.
Another possible reason: you changed the launch activity. Hint: never do it with already published applications! Reasons discussed in Android Developers blog.
I had the same problem. I did not realise that an app must be signed even for testing.
After self signing it, it installed fine.
My problem was: I used the Debug Apk, that was generated while I did the Run command from Android Studio
Solution was: Instead of using this file, clean project and click Build > Build APK(s) from Android Studio. Then you can use the generated APK from the usual folder (app/build/outputs/apk/debug/)
The file that was generated like this installed without a problem.
I had the same problem and here is how solved it : Go to the Manifest file and make sure you have the "Debuggable" and the "Test Only" attributes set to false. It worked for me :)
I had the same issue, i.e. App showed up as being installed, but would not launched when the icon was tapped. After some head-banging, I found that I had stupidly placed ' android:exported="false" ' for my main launcher activity within the AndroidManifest file.... Once I removed it, the App launched fine..
I know this is an old post, but for new users may be useful. I had the same problem: my application worked fine while debbuging. When I signed the APK I got the same message: "Application not installed".
I fixed that uninstalled my JDK (I was using jdk-6u14-windows-x64) and installed a new one (jdk-6u29-windows-x64). After export and sign the APK again, everything was ok!
Resuming, my problem was in JAVA version. Thank's Oracle!!
My problem was that I have multiple user accounts on the device. I deleted the app on 1 account, but it still was installed on the other account. Thus the namespace collided and did not install. Uninstalling the app from all user fixed it for me.
I faced a similar issue today and at first i thought it was my sd card which corrupted it. I tried it on many devices running android 4.4 and up but it kept bringing the same issue.After some googling and research i realized that i didn't select the v1 jar signature which is for devices older than android 7.0 nougat so i applied both of these signatures by selecting the two check boxes and generated a signed apk and it worked.
Link to solution Android – App not installed error when installing a signed APK – How to Fix
Sideloading debug apps for testing on a physical phone worked reliably until I upgraded the phone from Android Pie to Android 10. After that, the "App not installed" error came up every time I tried to sideload the app.
Based on a warning in my AndroidManifest.xml, I changed from...
<application
android:name=".App"
android:allowBackup="true" ... />
to...
<application
android:name=".App"
android:allowBackup="false" ... />
After that, I was able to sideload my app -- once. Then, I encountered the same "App not installed" error again. By changing allowBackup back to true, it worked again (at least once).
It is obvious from the number of answers and the variation in the answers that there are many reasons for this problem. I'm sharing this in case it helps others.
If you have a previous version for that application try to erase it first, now my problem was solved by that method.
If application's not installing, delete the file .android_secure/smdl2tmpl.asec from the SD card.
If the folder .android_secure is empty in the file manager, delete it from the PC.
ARGHHHHH! I was trying to install as Unsigned Release APK when the proper setting was DEBUG SDK.
There goes an hour.
In the end I found out that no apps were being installed successfully, not just mine. I set the Install App default from SD card to Automatic. That fixed it.
create keystore file through command line
keytool -genkey -alias key_file_name.keystore -keyalg RSA -validity 1000000000000000 -keystore key_file_name.keystore
export apk through Eclipse, right click on Android project Android Tools > Export Signed Application Package, then give keystore location & password.
this will crate signed apk at the same time apk will be zipaligned. And installable.
If you go through command line for all, some times you may face "Application not installed" error.
(Application not installed error can happen not only, when using command line. It can be some other reasons as well)
Using Android Studio, I had previously installed the unsigned debug version of the APK (Build > Build APK) and had to uninstall it before installing the signed release version (Build Variants > Build Variant: release, Build > Generate Signed APK).
I have also solved this issue,
The problem was that i declared my main activity twice,
On as the first activity to load and i specified also an intent-filter for it
And once again below it i declared it again .
Just make sure you don't declare your activities twice .
My problem was similar to that of #Lunatikzx. Because of wrong permission tag which was written as attribute to application:
<application
android:permission="android.permission.WRITE_EXTERNAL_STORAGE"
android:label="#string/app_name"
android:icon="#drawable/ic_launcher"
android:testOnly="false"
android:debuggable="true">
What fixed it for me was changing permission tag to separate tag like this:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Apparently this can also be caused by renaming the APK prior to installing it. I wanted to reduce the amount of typing users had to do to get the app from our web site by shortening the file name. After that, they were unable to install it.
Once I reverted to the original file name used when creating and signing the package I was able to update the installed app.
In my case it was because I was using the alpha version of support library 28. Looks like Google marks these pre release versions as testOnly. If you really want to release like this (for instance, you want to push an internal beta like I did), you can add this line to your gradle.properties file:
android.injected.testOnly=false
Check with the Android version.
If you are installing non-market apps, and incompatible version you will get this error.
Ex: Application targetted to 2.3.4
Your device is 2.2
Then you will get this error.
The "Application not installed" error can also occur if the app has been installed to or moved to the SD card, and then the USB cable has been connected, causing the SD card to unmount.
Turning off USB storage or moving the app back to internal storage would fix the issue in this case.
I also encountered this issue.
Kindly try this solution. Make sure that the package name of your project is different from your previous project that was already installed in your mobile phone. I think they get conflict in their names. It works in me.

Can not install my own generated apk

I updated my app and tested it on my device. Everything works fine if I test the app via the run button in eclipse but if I export it into an apk and try to install the apk it fails.
There is no error code or anything else, it just says the app has not been installed.
Any idea why this happens? I only changed a few things in my app: I removed the basegameutils lib from my app and migrated to the new api without basegameutils. Thats it (except for some bugfixes but that can not be the cause).
I did already restart eclipse and cleaned all projects mutiple times.
The target sdk is 22 and I am using newest system images and so on for that api level (my divce is a stock nexus 6 with 5.1.1 running). I also updated my build tools to 23.0.1 from 22.0.1 and removed the 22 version. Is this the cause?
I also tried to upload the apk in the dev console and there were no erros.
Thank you for your help.
EDIT:
The logcat output says the signature does not match the previously installed version.
If i try to install the current live version via the play store there is also an error message saying i can not install this app because another user already installed an incompatible version on this device (but i dont have it installed and i dont have multiple users on the device).
If i got to the app menu in the settings my app is shown at the bottom of the list but there is a note saying the app is not installed for the users. If i click on it all buttons are unclickable (so i can not uninstall it).
What is happening?
For me, selecting Signature Version v1 and v2 both solved the problem
Your signature changed, so as you mentioned you must uninstall the previous version. You tried to uninstall from the device UI and that fails - so try it from the command-line:
adb uninstall your_package_name
Seen on Nexus devices, occasionally only command-line uninstalls work.
I found a solution but I still have no idea what caused the problem.
somewhere on my device my app was still installed even though it didnt show up in the app drawer and the play store told me the same. In the settings/apps menu my app was still present (as i mentioned in the edit of my original post) so i clicked on it. If you click on the menu button you can chose unisntall for all users which did the trick. now I can install my apk again.
I have no idea how this happened but there you go, i hope this helps.
EDIT:
I had the same problem as this guy had. the accepted answer over there is much nicer than my poorly foramtted text ;)
"You cannot install this app because another user has already installed an incompatible version on this device"
I was facing same problem And I solved it this way, For Current Updated Android Studio 2.3
Build > Generate Signed apk.
Create Keystore path.
Put Password, alias, key password.
Build type select accordingly(eg to release in playstore use release).
Signature Version select both V1 and V2 checkboxes.
Finsih.
Go to the apk from explorer and use it for your playstore or in devices as Signed and Certified apk file.
For me the solution was to disable Play Protect on device.
You can not run signed apk directly in your android device .
I you want to run your apk then follow below steps :
1) Go to your device settings
2) In setting you find applications
3) In application checked unknown sources
This will allow you to run your signed apk without downloading from play store.
or
try this link :
"You cannot install this app because another user has already installed an incompatible version on this device"
The problem is because you have a version of your testing app. So, you're not really upgrading the app! Those are two different apps. You must first uninstall previous version (testing) so you can install the release (signed) version of your app.
I encountered this problem today and tried a few suggestions here, and this is how I solved the issue: I cleared my phone's caches / junk files and also uninstalled the test versions of the app and their APKs, and then reinstalled the new APK. Try this first before getting worried. 🙂
I got the save Error just incase someone faces this. For me it was because i have multiple projects for the same app on the phone. you need to delete older versions of the app from your phone.
If you have two options (V1 (jar signature) and V2 (Full APK Signature)) before generation signed apk. you should use V1 jar signature now, because there is no backward compatibility and all android phones with version < 7 won't accept this signature. Backward compatibility will be added in some next N Developer Preview.
There are also explanations on this developer.android in this link :
https://developer.android.com/about/versions/nougat/android-7.0#apk_signature_v2
In my case it was the proguardFiles path in build.gradle that caused this problem
Currently PlayStore performs regular checks for apps and device for harmful behavior. Installing signed APK manually is treated like unusually behavior so is preventend.
So turn off play protect feature temporary and your install will work as charm!
step one - open play store and select play protect
step two - click play protection setting button
step three - disable
step four - close and install your APK manually

Android "There is a problem parsing the package" [duplicate]

I got this error while installing the android application (Parse Error : There is a problem parsing the package.). I did the following steps.
First time I installed the application and it works fine.
I made changes to the existing application and change the version no in Manifest file.
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.openintents.samples.BasicOpenARDemo" android:versionCode="2" android:versionName="1.0.1">
Then I export the application and finish the code signing process.
For this, Right Click your Project node > select Export. There you will see a wizard. Follow the steps and finish the code signing also.
I got the ARDemo.apk file, Then I changed it’s name to ARDemo1.apk
Then I shipped this apk file to mobiles SD Card and started the installation I got the above error.
I googled, they say that problem with unpacking manifest file.
Can anyone tell me what could be wrong with me?
You said that the first time you installed the application it worked fine.
The only difference in the steps you outlined between the two versions are:
The version number (I'm assume
that this did not participate in
breaking anything)
The code
The name of the .apk file
Try renaming the ARDemo1.apk file back to ARDemo.apk (make sure to back up the older version) and see if that helps. My guess is that it has something to do with the name of the apk.
If it still does not work, then you can eliminate the name of the apk file as the source of the problem and start investigating 2) by rebuilding your old version and see if you have same problem again. If the problem does not exists with the rebuilt version of your old code then you know it must be something to do with your code.
I hope that gets you somewhere.
Cheers,
Joseph
Installation can give the specified error at least in following cases:
Name of the package is changed after signing: Use the exact name as the signed package is (instead, adjust the name in Manifest)
Package is compiled against on higher API level: Correct the API level in Manifest file
Package is executed from SD-card: Run (install) the apk -file from phones memory OR use adb command to install it
I've only seen the parsing error when the android version on the device was lower than the version the app was compiled for. For example if the app is compiled for android OS v2.2 and your device only has android OS v2.1 you'd get a parse error when you try to install the app.
Instead of shooting in the dark, get the reason for this error by installing it via adb:
adb -s emulator-5555 install ~/path-to-your-apk/com.app.apk
Replace emulator-5555 with your device name. You can obtain a list using:
adb devices
Upon failing, it will give a reason. Common reasons and their fixes:
INSTALL_PARSE_FAILED_NO_CERTIFICATES: Reference
INSTALL_FAILED_UPDATE_INCOMPATIBLE: Reference
The reason is apk is not signed.
Once the apk is signed, the issue will be resolved.
http://ionicframework.com/docs/guide/publishing.html
Please use the link on instructions to sign the apk.
If you're compiling and exporting your apk file under SDK version 2.1, it will not work on any android version below your SDK export "2.1". Android software is forward compatible not backward compatible. For example if you're programming using the android NDK (ann add-on to the android SDK) package that allows development in the C/C++ family, this is only compatible with android 2.3, android version 2.2 and below support java builds only. Therefore you will reaceive the "There is a problem parsing the package" error.
Check whether your device supports the version you specified in minSdkVersion in AndroidManifest.xml . If not specify the lower version and try again
I'm not repeating what is instructed here to input the Key store, password, etc.
Try
Build -> Generate Signed APK -> [ Input ] ---Next---> select BOTH
V1 (Jar Signature)
V2 (Full APK Signature)
I don't know why, but at least it worked in my situation.
Another possibility is that you have saved the apk file into application PRIVATE folder and then try to install (by starting an intent from your code). in this case, when you start intent, you get error parsing package. In this case, the raised error is about permission issues. The point is saving the file into private folders is not a good practice, however if you really want to do that, you should write file in MODE_WORL_READABLE when you download it. Please consider that MODE_WORLD_READABLE is deprecated and this solution is not the best as it has some security issues. The best is to save your file in an external storage.
If you are facing this issue in device using android 12. You can fix it by adding android:exported="true" in AndroidManifest.xml as mentioned below
<activity
android:name=".MainActivity"
android:exported="true"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:label="#string/app_name"
I got the same error (Parse Error, There is a problem parsing the package) while trying to install an .apk package from email. I was able to get around the problem by installing the 3rd party package installer ApKatcher:
http://www.addictivetips.com/mobile/install-android-apps-from-gmail/
ApKatcher isn't the only solution. A colleague of mine got around the problem by installing Astro File Manager.
You can find both applications in the Android Marketplace.
Similar issue, using this "borrowed" and slightly modified code:
Intent intent = new Intent(Intent.ACTION_VIEW);
File newApk = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) + "myapp.apk");
intent.setDataAndType(Uri.fromFile(newApk), "application/vnd.android.package-archive");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
result = true;
Needed to change the file creation to this (comma instead of plus in the File constructor, was missing '/' after the download directory):
File newApk = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS), "myapp.apk");
I had a bad tag pair in my manifest file.
<meta-data>
</meta-data>
Basically got in when I copied a bad meta-data sample code from payu pdf file. Crap.
One reason could be, that your activity'name is not defined in the manifest
<activity
android:name=""
...>
</activity>
above code was creating the same issue with me
Another problem causing this error can be installing APK from restricted SD card mount point /mnt/media_rw/MicroSD.
Use unrestricted mount point /Removable/MicroSD.
And just to help possible new readers, another reason may be errors in the manifest file. I had mistyped android:service as android.service and ran into the same error...
As mentioned by #Veneet Reddy install it via ADB.
Go to ADT Bundle/sdk/platform-tools past your .apk file and run command prompt as administrator.
Then run adb devices command which will list the connected devices or emulators that are running.
Then run adb -s yourDeviceID install yourApk.apk
Note:
uninstall the app if you have already installed before installing again.
I have had this problem Parse Error : There is a problem parsing the package.
I was testing on Android-8. I have same apk with same signature .Everything was same without the version number and version name. App was installing when I install it manually but this error occurred when I was downloading and installing updates programmatically. Then I have found my cause of problem.
There was an option to check canRequestPackageInstalls ()
When this method returns true then app get installed successfully. It was returning false always in my case.
So first I check this and then let the user to download and install updates.
In onCreate()
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
if (!packageManager.canRequestPackageInstalls()) {
startActivityForResult(
Intent(Settings.ACTION_MANAGE_UNKNOWN_APP_SOURCES).setData(
Uri.parse(String.format("package:%s", packageName))
), requestCodeqInstallPackage
)
} else {
canInstallPackage = true
}
}
In onActivityResult()
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
if (requestCode == requestCodeqInstallPackage && resultCode == Activity.RESULT_OK) {
if (packageManager.canRequestPackageInstalls()) {
canInstallPackage = true
}
} else {
canInstallPackage = false
Toast.makeText(mContext, "Auto update feature will not work", Toast.LENGTH_LONG)
.show()
}
}
Then when need to install update then-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
if(canInstallPackage){
doInstallAppProcess()
}else{
// generate error message
}
}
Hope it will help someone.
For anyone else having this issue the only time i ever got this error was when the API version in your Android Build configuration does not match what's on the physical device.
Go into Eclipse and right click on your project and go to properties. Select Android--WHICH BRINGS YOU TO ANDROID BUILD TARGET. Adjust you target to match the device and see if that resolves the issue.
I had this problem, even when I specified the correct minSDK and targetSDK version. My problem was, I was using "android:theme="#android:style/Theme.NoTitleBar.Fullscreen" in launcher activity, on Jellybean device. When I removed this attribute, it worked.
As a couple of the other answers have mentioned, there can be problems when installing from the SD card. In my case I was distributing my app via email attachment, and it usually worked fine. Just open the email and download the attachment (it apparently goes to the SD card) and click on it again and it gets installed.
But then one day it didn't work, and it turned out it was because I had the phone connected to my development PC via USB, and that placed the SD card in a different mode or something. So the solution was simply to disconnect the phone from the PC and then send the e-mail again and download the attachment again. Or else place the USB connection in "charging only" mode so the SD card is not "connected" to the PC.
You might also want to check the logs on the device to see if it's something simple like a permissions problem. You can check the logs using adb from a host/debug computer:
adb logcat
Or if you have access to the console (or when using Android-x86 get console by typing Alt+F1) then you can check the logs by using the logcat command:
logcat
I had the same problem using the apk file exported from android‌ Tools > Export. I used the apk file in bin folder instead and it worked!
P.S. apk file in bin folder is created after first time you run the application in eclipse.
In my case I signed with only V2 signature (from Android 7 onward) but tried to install on 5 and 6. Adding V1 during ARK generation/signing fixed the issue.
See Difference between signature versions - V1 (Jar Signature) and V2 (Full APK Signature) while generating a signed APK in Android Studio?.
In my case build 1 was installed correctly in my mobile using the signed APK (also from Google Play Store). But when I update the application with build 2 for first time, I had an issue installing it with the signed APK as I got "There was a problem parsing the package".
I tried several methods as specified above. But did not work.
After some time, I rerun the commands
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-key.keystore app-release-unsigned.apk myappkeyalias
zipalign -v 4 app-release-unsigned.apk MyApp.apk
and surprisingly, it worked.
It seems sometimes the APK built might be corrupt. So, Re-running jarsigner and zipalign commands resolved my issue.
use it inside build.gradle (Module:app)
minSdkVersion 14
targetSdkVersion 28
This error also comes when Android version is less than minSdkVersion
In my case i written
<activity android:".Stopwatch"/>
instead of
<activity android:name=".Stopwatch"/>
in android manifest.
Check your manifest and gradle file again.
Try this it works for me-
Changing the compileSdkVersion and targetSdkVersion to 31 or later will not let build the app on some devices, do the following thing-
In tags to be included with android:exported="true" or android:exported="false".
Install android studio version 2020.3.1 Canary 2
update AndroidManifest.xml
compileSdkVersion 30
targetSdkVersion 30
It will fix your issue for Android 12
I am experiencing the same “Parse error: There is a problem parsing the package “ error message with my signed APKs as others but I suspect it could be caused by different reasons.
To test this I did the following:
Setup
Windows 8.1
Eclipse
ADT Build: v22.6.2-1085508
I generated a typical new Helloworld app accepting all defaults.
I ran the app on an emulator and live device successfully.
I then sideloaded and installed the apk to my live device and ran it successfully.
It had generated an apk in the bin folder with a size of 782 KB.
I then exported the Helloworld app to the same bin folder signing the app from my key store which has been used successfully in the past to promote to Google Play.
It created an APK with a size of 385 KB (replacing the original apk).
I sideloaded the apk to my device and when I went to install it I got the error “Parse error: There is a problem parsing the package” (this is the same package that sideloaded and installed when done as a non exported form).

"Parse Error : There is a problem parsing the package" while installing Android application

I got this error while installing the android application (Parse Error : There is a problem parsing the package.). I did the following steps.
First time I installed the application and it works fine.
I made changes to the existing application and change the version no in Manifest file.
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.openintents.samples.BasicOpenARDemo" android:versionCode="2" android:versionName="1.0.1">
Then I export the application and finish the code signing process.
For this, Right Click your Project node > select Export. There you will see a wizard. Follow the steps and finish the code signing also.
I got the ARDemo.apk file, Then I changed it’s name to ARDemo1.apk
Then I shipped this apk file to mobiles SD Card and started the installation I got the above error.
I googled, they say that problem with unpacking manifest file.
Can anyone tell me what could be wrong with me?
You said that the first time you installed the application it worked fine.
The only difference in the steps you outlined between the two versions are:
The version number (I'm assume
that this did not participate in
breaking anything)
The code
The name of the .apk file
Try renaming the ARDemo1.apk file back to ARDemo.apk (make sure to back up the older version) and see if that helps. My guess is that it has something to do with the name of the apk.
If it still does not work, then you can eliminate the name of the apk file as the source of the problem and start investigating 2) by rebuilding your old version and see if you have same problem again. If the problem does not exists with the rebuilt version of your old code then you know it must be something to do with your code.
I hope that gets you somewhere.
Cheers,
Joseph
Installation can give the specified error at least in following cases:
Name of the package is changed after signing: Use the exact name as the signed package is (instead, adjust the name in Manifest)
Package is compiled against on higher API level: Correct the API level in Manifest file
Package is executed from SD-card: Run (install) the apk -file from phones memory OR use adb command to install it
I've only seen the parsing error when the android version on the device was lower than the version the app was compiled for. For example if the app is compiled for android OS v2.2 and your device only has android OS v2.1 you'd get a parse error when you try to install the app.
Instead of shooting in the dark, get the reason for this error by installing it via adb:
adb -s emulator-5555 install ~/path-to-your-apk/com.app.apk
Replace emulator-5555 with your device name. You can obtain a list using:
adb devices
Upon failing, it will give a reason. Common reasons and their fixes:
INSTALL_PARSE_FAILED_NO_CERTIFICATES: Reference
INSTALL_FAILED_UPDATE_INCOMPATIBLE: Reference
The reason is apk is not signed.
Once the apk is signed, the issue will be resolved.
http://ionicframework.com/docs/guide/publishing.html
Please use the link on instructions to sign the apk.
If you're compiling and exporting your apk file under SDK version 2.1, it will not work on any android version below your SDK export "2.1". Android software is forward compatible not backward compatible. For example if you're programming using the android NDK (ann add-on to the android SDK) package that allows development in the C/C++ family, this is only compatible with android 2.3, android version 2.2 and below support java builds only. Therefore you will reaceive the "There is a problem parsing the package" error.
Check whether your device supports the version you specified in minSdkVersion in AndroidManifest.xml . If not specify the lower version and try again
I'm not repeating what is instructed here to input the Key store, password, etc.
Try
Build -> Generate Signed APK -> [ Input ] ---Next---> select BOTH
V1 (Jar Signature)
V2 (Full APK Signature)
I don't know why, but at least it worked in my situation.
Another possibility is that you have saved the apk file into application PRIVATE folder and then try to install (by starting an intent from your code). in this case, when you start intent, you get error parsing package. In this case, the raised error is about permission issues. The point is saving the file into private folders is not a good practice, however if you really want to do that, you should write file in MODE_WORL_READABLE when you download it. Please consider that MODE_WORLD_READABLE is deprecated and this solution is not the best as it has some security issues. The best is to save your file in an external storage.
If you are facing this issue in device using android 12. You can fix it by adding android:exported="true" in AndroidManifest.xml as mentioned below
<activity
android:name=".MainActivity"
android:exported="true"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:label="#string/app_name"
I got the same error (Parse Error, There is a problem parsing the package) while trying to install an .apk package from email. I was able to get around the problem by installing the 3rd party package installer ApKatcher:
http://www.addictivetips.com/mobile/install-android-apps-from-gmail/
ApKatcher isn't the only solution. A colleague of mine got around the problem by installing Astro File Manager.
You can find both applications in the Android Marketplace.
Similar issue, using this "borrowed" and slightly modified code:
Intent intent = new Intent(Intent.ACTION_VIEW);
File newApk = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) + "myapp.apk");
intent.setDataAndType(Uri.fromFile(newApk), "application/vnd.android.package-archive");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
result = true;
Needed to change the file creation to this (comma instead of plus in the File constructor, was missing '/' after the download directory):
File newApk = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS), "myapp.apk");
I had a bad tag pair in my manifest file.
<meta-data>
</meta-data>
Basically got in when I copied a bad meta-data sample code from payu pdf file. Crap.
One reason could be, that your activity'name is not defined in the manifest
<activity
android:name=""
...>
</activity>
above code was creating the same issue with me
Another problem causing this error can be installing APK from restricted SD card mount point /mnt/media_rw/MicroSD.
Use unrestricted mount point /Removable/MicroSD.
And just to help possible new readers, another reason may be errors in the manifest file. I had mistyped android:service as android.service and ran into the same error...
As mentioned by #Veneet Reddy install it via ADB.
Go to ADT Bundle/sdk/platform-tools past your .apk file and run command prompt as administrator.
Then run adb devices command which will list the connected devices or emulators that are running.
Then run adb -s yourDeviceID install yourApk.apk
Note:
uninstall the app if you have already installed before installing again.
I have had this problem Parse Error : There is a problem parsing the package.
I was testing on Android-8. I have same apk with same signature .Everything was same without the version number and version name. App was installing when I install it manually but this error occurred when I was downloading and installing updates programmatically. Then I have found my cause of problem.
There was an option to check canRequestPackageInstalls ()
When this method returns true then app get installed successfully. It was returning false always in my case.
So first I check this and then let the user to download and install updates.
In onCreate()
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
if (!packageManager.canRequestPackageInstalls()) {
startActivityForResult(
Intent(Settings.ACTION_MANAGE_UNKNOWN_APP_SOURCES).setData(
Uri.parse(String.format("package:%s", packageName))
), requestCodeqInstallPackage
)
} else {
canInstallPackage = true
}
}
In onActivityResult()
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
if (requestCode == requestCodeqInstallPackage && resultCode == Activity.RESULT_OK) {
if (packageManager.canRequestPackageInstalls()) {
canInstallPackage = true
}
} else {
canInstallPackage = false
Toast.makeText(mContext, "Auto update feature will not work", Toast.LENGTH_LONG)
.show()
}
}
Then when need to install update then-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
if(canInstallPackage){
doInstallAppProcess()
}else{
// generate error message
}
}
Hope it will help someone.
For anyone else having this issue the only time i ever got this error was when the API version in your Android Build configuration does not match what's on the physical device.
Go into Eclipse and right click on your project and go to properties. Select Android--WHICH BRINGS YOU TO ANDROID BUILD TARGET. Adjust you target to match the device and see if that resolves the issue.
I had this problem, even when I specified the correct minSDK and targetSDK version. My problem was, I was using "android:theme="#android:style/Theme.NoTitleBar.Fullscreen" in launcher activity, on Jellybean device. When I removed this attribute, it worked.
As a couple of the other answers have mentioned, there can be problems when installing from the SD card. In my case I was distributing my app via email attachment, and it usually worked fine. Just open the email and download the attachment (it apparently goes to the SD card) and click on it again and it gets installed.
But then one day it didn't work, and it turned out it was because I had the phone connected to my development PC via USB, and that placed the SD card in a different mode or something. So the solution was simply to disconnect the phone from the PC and then send the e-mail again and download the attachment again. Or else place the USB connection in "charging only" mode so the SD card is not "connected" to the PC.
You might also want to check the logs on the device to see if it's something simple like a permissions problem. You can check the logs using adb from a host/debug computer:
adb logcat
Or if you have access to the console (or when using Android-x86 get console by typing Alt+F1) then you can check the logs by using the logcat command:
logcat
I had the same problem using the apk file exported from android‌ Tools > Export. I used the apk file in bin folder instead and it worked!
P.S. apk file in bin folder is created after first time you run the application in eclipse.
In my case I signed with only V2 signature (from Android 7 onward) but tried to install on 5 and 6. Adding V1 during ARK generation/signing fixed the issue.
See Difference between signature versions - V1 (Jar Signature) and V2 (Full APK Signature) while generating a signed APK in Android Studio?.
In my case build 1 was installed correctly in my mobile using the signed APK (also from Google Play Store). But when I update the application with build 2 for first time, I had an issue installing it with the signed APK as I got "There was a problem parsing the package".
I tried several methods as specified above. But did not work.
After some time, I rerun the commands
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-key.keystore app-release-unsigned.apk myappkeyalias
zipalign -v 4 app-release-unsigned.apk MyApp.apk
and surprisingly, it worked.
It seems sometimes the APK built might be corrupt. So, Re-running jarsigner and zipalign commands resolved my issue.
use it inside build.gradle (Module:app)
minSdkVersion 14
targetSdkVersion 28
This error also comes when Android version is less than minSdkVersion
In my case i written
<activity android:".Stopwatch"/>
instead of
<activity android:name=".Stopwatch"/>
in android manifest.
Check your manifest and gradle file again.
Try this it works for me-
Changing the compileSdkVersion and targetSdkVersion to 31 or later will not let build the app on some devices, do the following thing-
In tags to be included with android:exported="true" or android:exported="false".
Install android studio version 2020.3.1 Canary 2
update AndroidManifest.xml
compileSdkVersion 30
targetSdkVersion 30
It will fix your issue for Android 12
I am experiencing the same “Parse error: There is a problem parsing the package “ error message with my signed APKs as others but I suspect it could be caused by different reasons.
To test this I did the following:
Setup
Windows 8.1
Eclipse
ADT Build: v22.6.2-1085508
I generated a typical new Helloworld app accepting all defaults.
I ran the app on an emulator and live device successfully.
I then sideloaded and installed the apk to my live device and ran it successfully.
It had generated an apk in the bin folder with a size of 782 KB.
I then exported the Helloworld app to the same bin folder signing the app from my key store which has been used successfully in the past to promote to Google Play.
It created an APK with a size of 385 KB (replacing the original apk).
I sideloaded the apk to my device and when I went to install it I got the error “Parse error: There is a problem parsing the package” (this is the same package that sideloaded and installed when done as a non exported form).

Categories

Resources