Our app is not getting installed on phones running on Android KitKat. However the same app is getting installed when trying to install the apk directly. It is also working fine on other android versions. It is failing with Error Code -2. Have tried all the options which is there in the google support link but didn't help.
Manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.appilyever.app"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="15"
android:targetSdkVersion="23"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<permission
android:name="android.os.Bundle.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.appilyever.app.gcm.permission.C2D_MESSAGE" />
<application
android:icon="@drawable/logo"
android:label="@string/app_name">
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyCMV925evT4ROgFFRBqGevExaX4xNdh8hg" />
<activity
android:name=".WebViewActivity"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver
android:name="com.appilyever.app.gcm.GcmBroadcastReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<!-- Receives the actual messages. -->
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.appilyever.app.gcm" />
</intent-filter>
</receiver>
<service
android:name="com.appilyever.app.gcm.GcmIntentService"
android:enabled="true" />
</application>
</manifest>
Check your storage space If your device is low on space, it can stop apps from downloading and installing. Your device may be low on space if: You get a notification about storage space. There's less than 1 GB available on your device.
Corrupted storage, especially corrupted SD cards, is one of the most common reasons why Android app not installed error occurs. Unwanted data might contain elements that disturb the storage location, causing Android app can't install error.
As found by several people at Google Play Store error code -2, and now also by myself, a new release with an insignificant change makes the problem go away.
For future reference, the relevant line in the device log appears to be:
04-28 19:49:24.629: W/Finsky(19249): [11195] com.google.android.finsky.receivers.aa.a(2975): IOException while copying my.package.name (my.package.name): java.io.IOException: Output length overrun
After which it downloads the package file again, and then fails with:
04-28 19:49:45.619: A/Finsky(19249): [1] com.google.android.finsky.installer.aq.a(168): Already streaming file my.package.name682140009.apk for my.package.name 04-28 19:49:45.619: A/Finsky(19249): com.google.android.flib.log.WhatATerribleException 04-28 19:49:45.619: A/Finsky(19249): at com.google.android.flib.log.a.e(SourceFile:107) 04-28 19:49:45.619: A/Finsky(19249): at com.google.android.finsky.utils.FinskyLog.e(SourceFile:70) 04-28 19:49:45.619: A/Finsky(19249): at com.google.android.finsky.installer.aq.a(SourceFile:168) 04-28 19:49:45.619: A/Finsky(19249): at com.google.android.finsky.receivers.z.onPostExecute(SourceFile:3852)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With