title: Cannot install wear application
body: <p>I have an application I'm developing which has a Wear module and I'm having trouble getting it to install on the Wear device when I install the <strong>release</strong> version on the Mobile device. The Wear device ends up with the following log:</p>
  
  <pre><code>I/PkgMgrInstallUtil: Sending install intent to PackageInstaller Intent { act=android.intent.action.INSTALL_PACKAGE dat=content://com.google.android.clockwork.home.provider/host/app.id/wearable/app.id/apk typ=vnd.android.cursor.item/wearable_apk cmp=com.google.android.packageinstaller/com.android.packageinstaller.wear.WearPackageInstallerService (has extras) } forapp.id
  E/WearPkgInstallerService: Could not parse apk information for app.id
  </code></pre>
  
  <p>The android source points to <a href="https://github.com/android/platform_packages_apps_packageinstaller/blob/master/src/com/android/packageinstaller/PackageUtil.java" rel="nofollow">this</a> being the source of the error message "<strong>Could not parse apk information for</strong>":</p>
  
  <pre><code>public static PackageParser.Package getPackageInfo(File sourceFile) {
      final PackageParser parser = new PackageParser();
      try {
          PackageParser.Package pkg = parser.parseMonolithicPackage(sourceFile, 0);
          parser.collectManifestDigest(pkg);
          return pkg;
      } catch (PackageParserException e) {
          return null;
      }
  }
  </code></pre>
  
  <p>In addition, if I install a <strong>debug</strong> build directly to the Wear device (Sony SmartWatch3) the application does not start and I get a large warning message (below). That said, I can start the application just fine on the device from the application list and it works as expected.</p>
  
  <blockquote>
    <p>04-14 16:57:50.761 10494 10494 D AndroidRuntime: >>>>>> START
    com.android.internal.os.RuntimeInit uid 2000 &lt;&lt;&lt;&lt;&lt;&lt; 04-14 16:57:50.773
    10494 10494 D AndroidRuntime: CheckJNI is OFF 04-14 16:57:50.789 10494
    10494 W art     : 6f49f000-6fc40000 rw-p 00000000 103:00 127748<br>
    /data/dalvik-cache/arm/system@framework@boot.art 04-14 16:57:50.789
    10494 10494 W art     : b1425000-b3304000 r--p 00000000 b3:1f 623<br>
    /system/framework/arm/boot.oat 04-14 16:57:50.789 10494 10494 W art<br>
    : b3304000-b4a61000 r-xp 01edf000 b3:1f 623<br>
    /system/framework/arm/boot.oat 04-14 16:57:50.789 10494 10494 W art<br>
    : b4a61000-b4a62000 rw-p 0363c000 b3:1f 623<br>
    /system/framework/arm/boot.oat 04-14 16:57:50.789 10494 10494 W art<br>
    : b4a62000-b4a7a000 r--p 007a1000 103:00 127748<br>
    /data/dalvik-cache/arm/system@framework@boot.art 04-14 16:57:50.790
    10494 10494 W art     : b4a7a000-b4a7b000 rw-p 00000000 00:00 0<br>
    [anon:linker_alloc_vector] 04-14 16:57:50.790 10494 10494 W art     :
    b4a7c000-b4a7f000 r-xp 00000000 b3:1f 568<br>
    /system/lib/libsigchain.so 04-14 16:57:50.790 10494 10494 W art     :
    b4a7f000-b4a80000 r--p 00002000 b3:1f 568<br>
    /system/lib/libsigchain.so 04-14 16:57:50.790 10494 10494 W art     :
    b4a80000-b4a81000 rw-p 00003000 b3:1f 568<br>
    /system/lib/libsigchain.so 04-14 16:57:50.790 10494 10494 W art     :
    b4a81000-b4eb3000 r-xp 00000000 b3:1f 473        /system/lib/libart.so
    04-14 16:57:50.790 10494 10494 W art     : b4eb3000-b4eb4000 ---p
    00000000 00:00 0  </p>
  </blockquote>
  
  <p>… </p>
  
  <p>snip </p>
  
  <p>… </p>
  
  <blockquote>
    <p>04-14 16:57:50.809 10494 10494 W art<br>
    : b6f90000-b6f91000 r--p 0000e000 b3:1f 494<br>
    /system/lib/libcutils.so 04-14 16:57:50.809 10494 10494 W art     :
    b6f91000-b6f92000 rw-p 0000f000 b3:1f 494<br>
    /system/lib/libcutils.so 04-14 16:57:50.809 10494 10494 W art     :
    b6f92000-b6f93000 rw-p 00000000 00:00 0<br>
    [anon:linker_alloc_vector] 04-14 16:57:50.809 10494 10494 W art     :
    b6f93000-b6f94000 rw-p 00000000 00:00 0<br>
    [anon:linker_alloc_64] 04-14 16:57:50.809 10494 10494 W art     :
    b6f94000-b6f95000 r--p 00000000 00:00 0          [anon:linker_alloc]
    04-14 16:57:50.962 10494 10494 E memtrack: Couldn't load memtrack
    module (No such file or directory) 04-14 16:57:50.962 10494 10494 E
    android.os.Debug: failed to load memtrack module: -2 04-14
    16:57:50.970 10494 10494 I Radio-JNI: register_android_hardware_Radio
    DONE 04-14 16:57:51.032 10494 10494 D AndroidRuntime: Calling main
    entry com.android.commands.wm.Wm 04-14 16:57:51.036 10494 10494 D
    AndroidRuntime: Shutting down VM</p>
  </blockquote>