1

Sometime in the last month or so, when I run my project in the emulator, somewhere in the Run window this appears in red:

E/Icon: Unable to find pkg=com.google.android.deskclock for icon Icon(typ=RESOURCE pkg=com.google.android.deskclock id=0x7f0800ed)
android.content.pm.PackageManager$NameNotFoundException: com.google.android.deskclock
    at android.app.ApplicationPackageManager.getApplicationInfoAsUser(ApplicationPackageManager.java:423)
    at android.app.ApplicationPackageManager.getApplicationInfo(ApplicationPackageManager.java:412)
    at android.graphics.drawable.Icon.loadDrawableInner(Icon.java:366)
    at android.graphics.drawable.Icon.loadDrawable(Icon.java:334)
    at android.graphics.drawable.Icon$LoadDrawableTask.run(Icon.java:998)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at java.lang.Thread.run(Thread.java:923)

The app still runs without any other issue.

My project (it's a WearOS project) doesn't reference or use anything like "deskclock"; the only change I've made is upping the targetSdkVersion and compileSdkVersion from 29 to 31.

Does anyone have any idea where this could be coming from?

For reference, here are my dependencies:

dependencies {
compileOnly 'com.google.android.wearable:wearable:2.8.1'

implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.google.android.gms:play-services-wearable:17.1.0'
implementation 'com.google.android.gms:play-services-location:19.0.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'com.google.android.support:wearable:2.8.1'

implementation 'androidx.annotation:annotation:1.3.0'
implementation 'androidx.appcompat:appcompat:1.4.0'
implementation 'androidx.core:core:1.7.0'
implementation 'androidx.legacy:legacy-support-v13:1.0.0'
implementation 'androidx.preference:preference:1.1.1'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.wear:wear:1.2.0'

implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.2'

implementation "com.android.billingclient:billing:4.0.0"
implementation platform('com.google.firebase:firebase-bom:29.0.3')

// Declare the dependencies for the Crashlytics and Analytics libraries
implementation 'com.google.firebase:firebase-crashlytics'
implementation 'com.google.firebase:firebase-analytics'
}
Nick Esposito
  • 23
  • 1
  • 4
  • I've been getting the same thing under the same circumstances, going from a lower SDKVersion to 31. In my case (a Wear OS watchface), it's because the user has selected a time-related complication (world clock, day countdown, alarm, or any other of options); the code then tries to pull the icon/name to display in the settings for the complication. – Nick Esposito Feb 07 '22 at 15:06
  • It all works fine on my actual watch (granted, it's a Wear 2.x watch), but on the emulator I get the warning and nothing appears for the icon/title. I suspect it's either a bug in their Wear 3.0 (API 30) emulator, or an undisclosed library change in 3.0. It doesn't occur when I run the same code in an API 28 emulator. – Nick Esposito Feb 07 '22 at 15:12
  • UPDATE: Whatever the root cause, it first appears when going to compileSdkVersion 30. I ran the Google sample complications-master and displayed it in Wear OS emulators built with API 28, 29 and 30; the error only appears when compileSdkVersion is 30 and above, and in the API 30 emulator. – Nick Esposito Feb 08 '22 at 12:42
  • This later question seems related (https://stackoverflow.com/questions/73300846/cannot-find-complication-icon-on-galaxy-watch-4) and its answer may help you. – HendrikFrans Jan 31 '23 at 10:39

0 Answers0