02-03 15:25:59.663 561-839/? W/PackageManager: SELinuxMMAC.assignSeinfoValue
02-03 15:25:59.823 561-839/? W/PackageManager: achu SELinuxMMAC.assignSeinfoValue
02-03 15:26:06.863 561-839/? W/PackageManager
: Unknown permission com.google.android.c2dm.permission.RECEIVE in package com.kodulf.signwearapkdemo
02-03 15:26:06.973 561-839/? D/PackageManager: Sending to user 0: act=android.intent.action.PACKAGE_ADDED dat=package:com.kodulf.signwearapkdemo flg=0x8000000 Bundle[{android.intent.extra.UID=10126, android.intent.extra.user_handle=0}]
java.lang.RuntimeException:
It's not exception, just print call stack
at com.android.server.pm.PackageManagerService.sendPackageBroadcast(PackageManagerService.java:7753)
at com.android.server.pm.PackageManagerService$PackageHandler.doHandleMessage(PackageManagerService.java:1005)
at com.android.server.pm.PackageManagerService$PackageHandler.handleMessage(PackageManagerService.java:723)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:177)
at android.os.HandlerThread.run(HandlerThread.java:61)
02-03 15:26:07.363 561-832/? D/BackupManagerService: Received broadcast Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.kodulf.signwearapkdemo flg=0x8000010 (has extras) }
02-03 15:26:07.393 561-832/? D/ECS_EnterpriseContainerService: <<< Intent data is >>> : package:com.kodulf.signwearapkdemo
02-03 15:26:08.033 18739-18739/? D/[FileShare][Server]: ServerBroadcastReceiver : onReceive: android.intent.action.PACKAGE_ADDED // package:com.kodulf.signwearapkdemo
02-03 15:26:09.523 18476-18483/? D/jdwp: Got wake-up signal, bailing out of select
02-03 15:26:10.493 561-876/? I/CrashAnrDetector: onPackageAdded :
com.kodulf.signwearapkdemo
02-03 15:26:12.443 18931-18931/? I/SmartCardBroadcastReceiver: foundMatchingVendorPackage - Checking for com.kodulf.signwearapkdemo
02-03 15:26:13.213 18963-18963/? I/native_eup: registSignal start
02-03 15:26:13.213 18963-18963/? I/native_eup: registSignal end
02-03 15:26:13.213 18963-18963/? I/native_eup: set signal stack
02-03 15:26:13.393 18821-18821/? I/Process: Sending signal. PID: 18821 SIG: 9
02-03 15:26:14.563 19051-19051/? I/AOE: PackageReceiver<---->onPackageAdd package name is: com.kodulf.signwearapkdemo
02-05 00:09:35.909 2384-5346/? D/WearablePkgInstaller: Ignoring Google Play Services dependent app: com.kodulf.wearandhandheldlistviewdemo
02-05 00:09:35.999 2384-5346/? E/WearablePkgInstaller: Failed to add com.kodulf.wearandhandheldlistviewdemo
02-05 00:10:06.109 6133-6166/? D/WearablePkgInstaller: Ignoring Google Play Services dependent app: com.kodulf.wearandhandheldlistviewdemo
02-05 00:10:06.109 6133-6166/? E/WearablePkgInstaller: Adding failed for package com.kodulf.wearandhandheldlistviewdemo
解决办法 (如果不考虑用google play service,就用这个解决办法,google play service涉及到手机端和可穿戴端的数据同步)
1: 删除掉mobile的gradle 里面的google play service 相关的
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.1.0' compile 'com.google.android.gms:play-services:8.1.0' compile 'com.google.android.support:wearable:1.3.0' compile 'com.google.android.gms:play-services-wearable:8.1.0' wearApp project(':wear')
}
2:删除掉wear 的gradle 里面的google service 相关的
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.support:wearable:1.3.0' compile 'com.google.android.gms:play-services-wearable:8.1.0' }
备注: 在我使用MOTO X手机来进行开发测试的时候,并没有碰到这个错误,所以我认为可能是android 版本的问题,MOTO x 是android 5.0.2,而之前测试使用的手机时三星的4.几的版本的android的.