title: Parse error at Installation of APK file
body: <p>My apk file format is like this:</p>
  
  <pre><code>xxxx-debug.apk
  xx-xxx-debug-xxx-1.0.1.apk
  </code></pre>
  
  <p>I can download the apk files but I cannot install them. I'm facing the following error:</p>
  
  <pre><code>Parse error
      There was a problem while parsing the package.
  </code></pre>
  
  <p>Code used for Installation:</p>
  
  <pre><code>protected void install(String fileName) {
      Intent install = new Intent(Intent.ACTION_VIEW);
      install.setDataAndType(Uri.fromFile(new File(fileName)),"application/vnd.android.package-archive");
      startActivity(install);
  }
  </code></pre>
  
  <p>When the apk file are downloaded, a number is appended at the end of the file e.g. <code>some.apk</code> becomes <code>some-1.apk</code>. </p>
  
  <p>What I have tried/checked so far:</p>
  
  <ul>
  <li>check on the option “Unknown sources.”   </li>
  <li>uses-permission <code>android:name="android.permission.INSTALL_PACKAGES" tools:ignore="ProtectedPermissions"</code></li>
  <li>android device version is 5.0.1  </li>
  <li>apk files are not corrupted because I've managed to install it in a different way</li>
  </ul>