title: Installing APK not working, but deploying from Android studio works
body: <h1>Edit</h1>
  
  <h2>The APK is a signed one which have the problem, while installing directly from android studio causes no issues. (Only using the APK).</h2>
  
  <p>After finishing developing the app I tried to generate an APK and give to a friend for a test; He said it's not working (not installable). So I grapped the phone Motorolla with Android 6.0.1 and tried to debug the problem from the Android Monitor in Android studio and this was the error there :</p>
  
  <blockquote>
    <p>unable to parse package file android</p>
  </blockquote>
  
  <p>Then i tried the same APK on the same phone i was using to test (Samsung J3 with 5.1.1 Android version) and got the following error in the logs of Android monitor:</p>
  
  <blockquote>
    <p>Class not found when unmarshalling:
    com.android.packageinstaller.InstallFlowAnalytics</p>
  </blockquote>
  
  <p>I never had this or something like it before, googled a bit and tried to find an answer on SOF found a couple of answers which none of them worked.</p>
  
  <ul>
  <li>disabled proGuard</li>
  <li>added android:extractNativeLibs="true" to manifest</li>
  <li>Increased/Decreased the SDK version</li>
  </ul>
  
  <p>as I said none of these worked, any idea ?</p>
  
  <p>This is my manifest and my Gradle files :</p>
  
  <h1>Manifest file</h1>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="my.package.myapp"&gt;
  
      &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
  
      &lt;application
          android:icon="@drawable/ice_launder"
          android:label="@string/app_name"
          android:roundIcon="@drawable/ic_launcher_round"
          android:supportsRtl="true"
          android:theme="@style/AppTheme"&gt;
          &lt;activity android:name="my.package.MainActivity"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
          &lt;activity android:name="my.package.MoreLikeThisActivity" /&gt;
          &lt;activity android:name="my.package.SearchResultActivity" /&gt;
          &lt;activity android:name="my.package.LastResultsActivity" /&gt;
          &lt;activity android:name="my.package.CompanyDetailsActivity" /&gt;
          &lt;activity android:name="my.package.OnboardingActivity"/&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <h1>Gradle</h1>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 26
      buildToolsVersion "26.0.1"
      defaultConfig {
          applicationId "my.package.myapp"
          minSdkVersion 21
          targetSdkVersion 26
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  repositories {
      mavenCentral() // jcenter() works as well because it pulls from Maven Central
  }
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
          exclude group: 'com.android.support', module: 'support-annotations'
      })
      compile 'com.android.support:appcompat-v7:26.+'
      compile 'com.android.support.constraint:constraint-layout:1.0.2'
      compile 'com.google.code.gson:gson:2.8.1'
      compile 'com.android.volley:volley:1.0.0'
      compile 'com.github.bumptech.glide:glide:4.0.0'
      compile 'com.github.navasmdc:MaterialDesign:1.5@aar'
      compile 'com.ogaclejapan.smarttablayout:library:1.2.1@aar'
      testCompile 'junit:junit:4.12'
      annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0'
  }
  </code></pre>