Android Wear包装 - 安装失败

时间:2018-05-16 14:37:27

标签: java android apk wear-os android-wear-2.0

此问题最近刚刚在升级手表后开始发生。

手机正在运行Android 7.0 Smartwatch正在运行Wear OS:1.1 / Android OS:8.0.0

Mobile / WearOS app配置为使用(graddle)
minSdk:23
targetSdk:26

jarsigner / zipalign - WearApp:好的 jarsigner / zipalign - MobileApp:好的 adb install on mobile:好的

SmartWatch通知配套应用:OK
推送"安装应用程序"在SmartWatch上:失败(这是新的)

请参阅以下日志:

05-16 22:36:48.438   556   556 I EmbeddedAppsService: Download complete for com.wavestracker.app
05-16 22:36:48.439  1046  1058 I Finsky  : [95] com.google.android.finsky.wear.receivers.d.a(2): Embedded download completed for com.wavestracker.app
05-16 22:36:48.460   556   556 I EmbeddedAppsService: Start installing com.wavestracker.app
05-16 22:36:48.462   556   556 I PkgMgrPvtUtil: Sending install intent to PackageInstaller Intent { act=android.intent.action.INSTALL_PACKAGE dat=package://com.wavestracker.app cmp=com.google.android.packageinstaller/com.android.packageinstaller.wear.WearPackageInstallerService (has extras) } forcom.wavestracker.app
05-16 22:36:48.681   556   625 D StreamDBQueue: Promised revision #10081 to queue a new op
05-16 22:36:48.682   556   625 D BaseStreamManager: Promised set @ r#10081 for (android,tag=null,id=40,notifKey=0|android|40|null|1000)
05-16 22:36:48.682   556  1973 D StreamDatabase:   filtering notification, reason=FRAMEWORKS_FOREGROUND_NOTIFICATION, itemId=StreamItemIdAndRevision{notifKey=0|android|40|null|1000, packageName=android, id=40, revision=10081, originalRevision=10081, updateCount=0}
05-16 22:36:48.683   556  1973 D StreamAdapter: onStreamChange StreamChangeEvent[modified=1, removed=0, modifiedTop=0, removedTop=0, reorder=false, possibleAlertingItem=none]
05-16 22:36:48.683   556  1973 D StreamAdapter:   modified:
05-16 22:36:48.683   556  1973 D StreamAdapter:     StreamItemIdAndRevision{notifKey=0|android|40|null|1000, packageName=android, id=40, revision=10081, originalRevision=10081, updateCount=0}
05-16 22:36:48.712   556  1973 D NewStreamAdapter: Publishing revision #10081 to adapter clients
05-16 22:36:48.728   556   625 D StreamDBQueue: Promised revision #10082 to queue a new op
05-16 22:36:48.728   556   625 D BaseStreamManager: Promised set @ r#10082 for (com.google.android.packageinstaller,tag=null,id=1,notifKey=0|com.google.android.packageinstaller|1|null|10024)
05-16 22:36:48.729   556  1973 D DynamicBucketRankerImpl: StreamItemIdAndRevision{notifKey=0|com.google.android.packageinstaller|1|null|10024, packageName=com.google.android.packageinstaller, id=1, revision=10082, originalRevision=10082, updateCount=0} in bucket #3 (Ongoing)
05-16 22:36:48.730   556  1973 D WatchStreamDB: com.google.android.clockwork.common.stream.TopLevelStreamItem@9bfb986 ranked at index 0
05-16 22:36:48.730   556  1973 D StreamAdapter: onStreamChange StreamChangeEvent[modified=1, removed=0, modifiedTop=1, removedTop=0, reorder=true, possibleAlertingItem=none]
05-16 22:36:48.730   556  1973 D StreamAdapter:   modified:
05-16 22:36:48.730   556  1973 D StreamAdapter:     StreamItemIdAndRevision{notifKey=0|com.google.android.packageinstaller|1|null|10024, packageName=com.google.android.packageinstaller, id=1, revision=10082, originalRevision=10082, updateCount=0}
05-16 22:36:48.730   556  1973 D StreamAdapter:   modifiedTopLevel:
05-16 22:36:48.730   556  1973 D StreamAdapter:     StreamItemIdAndRevision{notifKey=0|com.google.android.packageinstaller|1|null|10024, packageName=com.google.android.packageinstaller, id=1, revision=10082, originalRevision=10082, updateCount=0}
05-16 22:36:48.744   556  1973 D NewStreamAdapter: Publishing revision #10082 to adapter clients
05-16 22:36:48.761   556   556 D StreamScroll: onItemsRemoved positionStart:0 itemCount:1
05-16 22:36:48.762   556   556 D StreamPreviewer: top stream item removed, isInteractive=true isInHomePosition=true shouldScrollToTop=false
05-16 22:36:48.762   556   556 D StreamScroll: onItemsAdded positionStart:0 itemCount:1
05-16 22:36:48.762   556   556 D StreamPreviewer: TOP_CHANGED: considering preview/peek; metadata for top item: metadata[mayHideyPeek=true mWasPushedDown=false mPreviewed=false, mAlerting=false, mShouldAlwaysHideyPeek=false, mOngoing=true]
05-16 22:36:48.762   556   556 D StreamPreviewLogic: item:metadata[mayHideyPeek=true mWasPushedDown=false mPreviewed=false, mAlerting=false, mShouldAlwaysHideyPeek=false, mOngoing=true] ambient:no paused:yes action:NONE
05-16 22:36:48.762   556   556 D StreamPreviewer: TOP_CHANGED:should not preview and in home position, nothing to do
05-16 22:36:49.083   272   281 I zygote  : Background concurrent copying GC freed 17533(1223KB) AllocSpace objects, 16(360KB) LOS objects, 19% free, 8MB/10MB, paused 7.304ms total 456.694ms
05-16 22:36:49.116  1228  2330 W ziparchive: Zip: missed a central dir sig (at 0)
05-16 22:36:49.116  1228  2330 W zipro   : Error opening archive /data/user_de/0/com.google.android.packageinstaller/files/tmp/com.wavestracker.app.apk: Iteration ended
05-16 22:36:49.116  1228  2330 D asset   : failed to open Zip archive '/data/user_de/0/com.google.android.packageinstaller/files/tmp/com.wavestracker.app.apk'
05-16 22:36:49.118  1228  2330 W PackageParser: Failed to parse /data/user_de/0/com.google.android.packageinstaller/files/tmp/com.wavestracker.app.apk
05-16 22:36:49.118  1228  2330 W PackageParser: java.io.FileNotFoundException: AndroidManifest.xml
05-16 22:36:49.118  1228  2330 W PackageParser:     at android.content.res.AssetManager.openXmlAssetNative(Native Method)
05-16 22:36:49.118  1228  2330 W PackageParser:     at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:546)
05-16 22:36:49.118  1228  2330 W PackageParser:     at android.content.res.AssetManager.openXmlResourceParser(AssetManager.java:514)
05-16 22:36:49.118  1228  2330 W PackageParser:     at android.content.pm.PackageParser.parseApkLite(PackageParser.java:1667)
05-16 22:36:49.118  1228  2330 W PackageParser:     at android.content.pm.PackageParser.parseMonolithicPackageLite(PackageParser.java:848)
05-16 22:36:49.118  1228  2330 W PackageParser:     at android.content.pm.PackageParser.parseMonolithicPackage(PackageParser.java:1203)
05-16 22:36:49.118  1228  2330 W PackageParser:     at android.content.pm.PackageParser.parsePackage(PackageParser.java:969)
05-16 22:36:49.118  1228  2330 W PackageParser:     at android.content.pm.PackageParser.parsePackage(PackageParser.java:981)
05-16 22:36:49.118  1228  2330 W PackageParser:     at com.android.packageinstaller.PackageUtil.getPackageInfo(PackageUtil.java:60)
05-16 22:36:49.118  1228  2330 W PackageParser:     at com.android.packageinstaller.wear.WearPackageInstallerService.installPackage(WearPackageInstallerService.java:247)
05-16 22:36:49.118  1228  2330 W PackageParser:     at com.android.packageinstaller.wear.WearPackageInstallerService.-wrap1(Unknown Source:0)
05-16 22:36:49.118  1228  2330 W PackageParser:     at com.android.packageinstaller.wear.WearPackageInstallerService$ServiceHandler.handleMessage(WearPackageInstallerService.java:101)
05-16 22:36:49.118  1228  2330 W PackageParser:     at android.os.Handler.dispatchMessage(Handler.java:105)
05-16 22:36:49.118  1228  2330 W PackageParser:     at android.os.Looper.loop(Looper.java:164)
05-16 22:36:49.118  1228  2330 W PackageParser:     at android.os.HandlerThread.run(HandlerThread.java:65)
05-16 22:36:49.119  1228  2330 E WearPkgInstallerService: Could not parse apk information for com.wavestracker.app
05-16 22:36:49.140   556   625 D StreamDBQueue: Promised revision #10083 to queue a new op
05-16 22:36:49.140   556   625 D BaseStreamManager: Promised remove @ r#10083 for StreamItemIdAndRevision{notifKey=0|com.google.android.packageinstaller|1|null|10024, packageName=com.google.android.packageinstaller, id=1, revision=0, originalRevision=0, updateCount=0} (@10082): SBN removed: StreamItemIdAndRevision{notifKey=0|com.google.android.packageinstaller|1|null|10024, packageName=com.google.android.packageinstaller, id=1, revision=0, originalRevision=0, updateCount=0}

有趣的事实:"调试"应用程序工作正常,"发布" (签名)版本没有;显然谷歌不允许我使用"调试" app / apk。

请注意,这不是该应用的第一个或第二个版本;所以我必须坚持整个jarsigner,zipalign,res / xml,res / raw程序已经排练过几次。

1 个答案:

答案 0 :(得分:0)

我终于让它在手机上工作并观看了。

这是我必须做的事情:
1)从移动电话中卸载应用程序 2)重新启动两个设备(电话/手表) 3)清洁/建造/签名/ ZipAligned WearApp
4)Cleaned / Built / Signed / ZipAligned MobileApp
5)关闭手表上的Wi-Fi /无线
6)手机上安装的应用程序 7)Watch上弹出通知,安装OK。

我不相信一切都很好 如果这有助于其他人,我们非常乐意将这些笔记留在这里。

PS:我将继续进行调查,并尝试再次破解:)