LawnchairLauncher / lawnicons

Adds themed icons to Lawnchair.
Apache License 2.0
1.38k stars 460 forks source link

[DISCUSSION] Resources$NotFoundException: Drawable app.lawnchair.lawnicons:drawable #834

Closed peterge1998 closed 1 year ago

peterge1998 commented 1 year ago

About this discussion

After my pr got merged, i get this exception:

Lawnchair bug report 18.11.2022 05:21:06
version: 12.1.0 Dev (#1368) (12010005)
commit: 3ff0672
build.brand: google
build.device: panther
build.display: TD1A.221105.001.2022111000
build.fingerprint: google/panther/panther:13/TD1A.221105.001/2022111000:user/release-keys
build.hardware: panther
build.id: TD1A.221105.001
build.manufacturer: Google
build.model: Pixel 7
build.product: panther
build.type: user
version.codename: REL
version.incremental: 2022111000
version.release: 13
version.sdk_int: 33
display.density_dpi: 420
isRecentsEnabled: false

error: Uncaught exception

android.content.res.Resources$NotFoundException: Drawable app.lawnchair.lawnicons:drawable/comdirect_phototan with resource ID #0x7f060087
Caused by: android.content.res.Resources$NotFoundException: File res/drawable/comdirect_phototan.xml from drawable resource ID #0x7f060087
    at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:875)
    at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:669)
    at android.content.res.Resources.loadDrawable(Resources.java:1002)
    at android.content.res.Resources.getDrawableForDensity(Resources.java:992)
    at android.content.res.Resources.getDrawable(Resources.java:931)
    at android.content.res.Resources.getDrawable(Resources.java:906)
    at com.android.launcher3.icons.ThemedIconDrawable$ThemeData.loadMonochromeDrawable(ThemedIconDrawable.java:239)
    at com.android.launcher3.icons.ThemedIconDrawable.<init>(ThemedIconDrawable.java:83)
    at com.android.launcher3.icons.ThemedIconDrawable$ThemedConstantState.newDrawable(ThemedIconDrawable.java:136)
    at com.android.launcher3.icons.ThemedIconDrawable$ThemedBitmapInfo.newThemedIcon(ThemedIconDrawable.java:158)
    at com.android.launcher3.model.data.ItemInfoWithIcon.newIcon(ItemInfoWithIcon.java:241)
    at com.android.launcher3.BubbleTextView.applyIconAndLabel(BubbleTextView.java:380)
    at com.android.launcher3.BubbleTextView.applyFromWorkspaceItem(BubbleTextView.java:318)
    at com.android.launcher3.BubbleTextView.applyFromWorkspaceItem(BubbleTextView.java:288)
    at com.android.launcher3.BubbleTextView.applyFromWorkspaceItem(BubbleTextView.java:283)
    at com.android.launcher3.folder.FolderPagedView.createNewView(FolderPagedView.java:217)
    at com.android.launcher3.folder.FolderPagedView$$ExternalSyntheticLambda1.apply(Unknown Source:4)
    at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:203)
    at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1390)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:475)
    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:236)
    at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:517)
    at com.android.launcher3.folder.FolderPagedView.bindItems(FolderPagedView.java:154)
    at com.android.launcher3.folder.Folder.animateOpen(Folder.java:663)
    at com.android.launcher3.folder.Folder.animateOpen(Folder.java:648)
    at com.android.launcher3.touch.ItemClickHandler.onClickFolderIcon(ItemClickHandler.java:118)
    at com.android.launcher3.touch.ItemClickHandler.onClick(ItemClickHandler.java:95)
    at com.android.launcher3.touch.ItemClickHandler.$r8$lambda$c3IcSovkrXGdCZtXy0f_A5Sz5VA(Unknown Source:0)
    at com.android.launcher3.touch.ItemClickHandler$$ExternalSyntheticLambda2.onClick(Unknown Source:0)
    at android.view.View.performClick(View.java:7506)
    at android.view.View.performClickInternal(View.java:7483)
    at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0)
    at android.view.View$PerformClick.run(View.java:29335)
    at android.os.Handler.handleCallback(Handler.java:942)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loopOnce(Looper.java:201)
    at android.os.Looper.loop(Looper.java:288)
    at android.app.ActivityThread.main(ActivityThread.java:7904)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:952)
Caused by: org.xmlpull.v1.XmlPullParserException: no path defined
    at android.graphics.drawable.VectorDrawable.inflateChildElements(VectorDrawable.java:883)
    at android.graphics.drawable.VectorDrawable.inflate(VectorDrawable.java:738)
    at android.graphics.drawable.DrawableInflater.inflateFromXmlForDensity(DrawableInflater.java:141)
    at android.graphics.drawable.Drawable.createFromXmlInnerForDensity(Drawable.java:1394)
    at android.graphics.drawable.Drawable.createFromXmlForDensity(Drawable.java:1355)
    at android.content.res.ResourcesImpl.loadXmlDrawable(ResourcesImpl.java:907)
    at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:861)
    ... 42 more
peterge1998 commented 1 year ago

Seems to be sth with comdirect_phototan...

SuperDragonXD commented 1 year ago

The said file contents are:

<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="192dp"
    android:height="192dp"
    android:viewportWidth="192"
    android:viewportHeight="192">
</vector>

Lawnicons can't find the drawable contents, so it crashes.

SuperDragonXD commented 1 year ago

You can create a new PR with the actual content of the drawable, and uncommenting the line.