我有一个我正在开发的具有Wear模块的应用程序,当我在Mobile上安装发行版版本时,我无法在Wear设备上安装它设备。 Wear设备最终得到以下日志:
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
android源指向this作为错误消息的来源" 无法解析apk信息":
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;
}
}
此外,如果我将调试版本直接安装到Wear设备(Sony SmartWatch3),则应用程序无法启动,我收到一条大警告消息(如下所示)。也就是说,我可以从应用程序列表中在设备上启动应用程序,并按预期工作。
04-14 16:57:50.761 10494 10494 D AndroidRuntime:>>>>>>开始 com.android.internal.os.RuntimeInit uid 2000<<<<<<< 04-14 16:57:50.773 10494 10494 D AndroidRuntime:CheckJNI关闭04-14 16:57:50.789 10494 10494 W art:6f49f000-6fc40000 rw-p 00000000 103:00 127748
/data/dalvik-cache/arm/system@framework@boot.art 04-14 16:57:50.789 10494 10494艺术品:b1425000-b3304000 r - p 00000000 b3:1f 623
/system/framework/arm/boot.oat 04-14 16:57:50.789 10494 10494 W art
:b3304000-b4a61000 r-xp 01edf000 b3:1f 623
/system/framework/arm/boot.oat 04-14 16:57:50.789 10494 10494 W art
:b4a61000-b4a62000 rw-p 0363c000 b3:1f 623
/system/framework/arm/boot.oat 04-14 16:57:50.789 10494 10494 W art
:b4a62000-b4a7a000 r - p 007a1000 103:00 127748
/data/dalvik-cache/arm/system@framework@boot.art 04-14 16:57:50.790 10494 10494艺术品:b4a7a000-b4a7b000 rw-p 00000000 00:00 0
[匿名:linker_alloc_vector] 04-14 16:57:50.790 10494 10494 W art: b4a7c000-b4a7f000 r-xp 00000000 b3:1f 568
/system/lib/libsigchain.so 04-14 16:57:50.790 10494 10494 W art: b4a7f000-b4a80000 r - p 00002000 b3:1f 568
/system/lib/libsigchain.so 04-14 16:57:50.790 10494 10494 W art: b4a80000-b4a81000 rw-p 00003000 b3:1f 568
/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
...
snip
...
04-14 16:57:50.809 10494 10494 W art
:b6f90000-b6f91000 r - p 0000e000 b3:1f 494
/system/lib/libcutils.so 04-14 16:57:50.809 10494 10494 W art: b6f91000-b6f92000 rw-p 0000f000 b3:1f 494
/system/lib/libcutils.so 04-14 16:57:50.809 10494 10494 W art: b6f92000-b6f93000 rw-p 00000000 00:00 0
[匿名:linker_alloc_vector] 04-14 16:57:50.809 10494 10494 W art: b6f93000-b6f94000 rw-p 00000000 00:00 0
[匿名:linker_alloc_64] 04-14 16:57:50.809 10494 10494艺术: b6f94000-b6f95000 r - p 00000000 00:00 0 [anon:linker_alloc] 04-14 16:57:50.962 10494 10494 E memtrack:无法加载memtrack 模块(没有这样的文件或目录)04-14 16:57:50.962 10494 10494 E. android.os.Debug:无法加载memtrack模块:-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:呼叫主要 entry com.android.commands.wm.Wm 04-14 16:57:51.036 10494 10494 D. AndroidRuntime:关闭VM
答案 0 :(得分:0)
我似乎已经通过从头开始创建一个新项目来解决它。解析让我觉得它可能是一个意外的角色。