I'm working with Xamarin Android and I want to export apk file in Visual Studio 2015. I use "Archive" feature in "Build" option on navigation bar of Visual Studio 2015. I exported apk file success but when I install it on device, it happens error
Parse Error : There is a problem parsing the package
Anyone can help me? Thanks!!!
This error can be caused by various reasons, but you can check a few things to make sure you have generated the correct apk file:
Please make sure you have signed the apk file. You can refer to Manually Signing the APK for details about signing an apk file.
Please check the CPU Architectures of your apk file.
If the error persists, please try use adb install apkFileName.apk to install the apk. The error message will be shown if the installation fails. You can find the adb under AndroidSDKFolder\platform-tools\adb.exe.
Related
I am developing an app, if I run from android studio in to my device, it is running absolutely fine. If I put my apk into google drive and share with others, it is showing error ("Android apk Installation failed. Installation package error, unable to install.") when they try to install the app. It's not a signed apk. It's still in prototype phase (debug mode).
Please let me know where I am doing wrong.
I found the solution for the problem I faced. Some solutions i tried :
First I tried with generating a signed release apk. Again here I faced same issue working fine when ran from android studio but getting error ("Android apk Installation failed. Installation package error, unable to install." / "app not installed." depending on the device ) , when tried to install app from google drive.
I checked installing app from command line using command " adb install app-release.apk ". Then I got the error :
app-release.apk: 1 file pushed. 4.3 MB/s (1246134 bytes in 0.275s)
pkg: /data/local/tmp/app-release.apk Failure
[INSTALL_FAILED_TEST_ONLY]
This is the link for the above issue
link
And the solution for this issue was in same link. The solution finally worked for me was
android.injected.testOnly=false
This line we need to add in gradle.properties file.
I am including a share feature in my app to share the app via any intent.
But when it is installed on any other device, the following error pops up
"App not installed. The package appears to be corrupted."
How could I share my app?
Use Build>Build APK(s) to build the apk and install the apk directly and then share, it should work.
This is because, from Android Studio 3.0 onwards, the attribute testOnly is added to the merged manifest as android:testOnly="true".
This can be verified from Build>Analyze APK>AndroidManifest.xml.
More information can be found here
To solve this issue go to Build -> Build APK and get the location of apk and run that apk file.It will solve your issue.
I made an Android project on Android Studio. When I ran it on test Android device which was plugged to my system using a USB cable, it ran successfully.
However, then I generated the APK and uploaded in Diawi website. When I tried to install this APK, I got following error:
App not installed.
The package appears to be corrupt.
APK file however is not corrupt at all since when I installed it manually after copying it from build folder, it was successfully installed on the Galaxy S7.
How to fix this issue?
In my case, I signed APK with V2 signature and it showed this error message. I tried signing the app only using V1 scheme and it worked.
As official docs say, if you have problem building APK using V2 scheme, you can skip and sign only using V1.
In Android Version May 25th-2019 I faced similar issue :
Build -> Build Apk(s) and then locate apk from build -> output -> apk -> debug
Solve my issue.
You could try avoiding put the names: com.example, com.android, etcc in your package, then Build>Rebuild and/or BuildGenerate signed APK and follow the steps. I hope help you!
Have these erro when i'm trying to build the apk to some devices. Have no idea whats going on.
I get that when i build and install apk on device at the first time.
Someone have some tips for that?
[[EDIT]]
Well, after creating a debug key on keystore, i can build and deploy the apk via ADP to the device. But, dont know why, the error just return...
And now, we have other error:
UPDATE:
I Fix that issue removing all Android SDK and Android Studio and ReInstall it.
The problem can be solved by addding the install flags -r -t in the Run/Debug Configuration Dialog like it's showed in the given image
You can find Run/Debug Configuration Dialog location here according to Jetbrains.
UPDATE: Depending on the Android Studio version the Run/Debug Configuration position in the IDE can be slightly different, but always refer Jetbrains to find whatever you are looking for
When you've installed an APK from another source, Android Studio warns you before overwriting.
For example, if I've developed an application, uploaded it onto the Google Play Store, downloaded it, then try to re-deploy that same application from Android Studio, I'll get this warning.
It's trying to tell you that the way the package is signed is different; it's warning you that another app might be masquerading as the original.
The reason is you are trying to install the application with the same package name.
If you have already downloaded the same application from the play store /app market, then simply uninstall that application and RE-RUN.
This error can also occur if you recently switched branch which had different build variants declared in build.gradle file and you didn't perform gradle sync.
For example you had release and debug and then you switched to branch which has releas, deubg and staging variants; your project will still build but while installing apk this error can pop up.
I am using androidlive3.0 OS in my virtual box.
I want to install one apk file in that.
I have downloaded that apk file and when I click for installation it is giving me error like "There is some problem in parsing"
How can i solve this problem?
Is your target sdk the level required for Android 3?
Have you exported the apk as a signed APK? You cannot take the apk that is created during development and install it on a device, you need to export (and preferrably sign) it first.
Rgs
AJ