Gurupreet / ComposeCookBook

A Collection on all Jetpack compose UI elements, Layouts, Widgets and Demo screens to see it's potential
MIT License
6.34k stars 810 forks source link

Font Runtime Error #91

Closed wiryadev closed 3 years ago

wiryadev commented 3 years ago

Describe the bug The app force closed the first time it try to launch.

To Reproduce use the latest master branch (by the time this issue created) and run it

Screenshots image

Additional context Here is the full log. It points out to getFontFamily function and i think it is because the Font has multiple implementation. See this screenshot:

image

image

wiryadev commented 3 years ago

Tried to update fontAwesomeCompose version to 1.0.1-alpha01. The old error is gone, but replaced with this error:

java.lang.NoSuchMethodError: No interface method startRestartGroup(ILjava/lang/String;)Landroidx/compose/runtime/Composer; in class Landroidx/compose/runtime/Composer; or its super classes (declaration of 'androidx.compose.runtime.Composer' appears in /data/app/com.guru.composecookbook-WgSDCeCP5Tg7qW3QQga3Ug==/base.apk)
        at com.guru.fontawesomecomposelib.FaIconKt.FaIcon-EfRbmQ0(FaIcon.kt:35)
        at com.guru.composecookbook.ComposableSingletons$MainActivityKt$lambda-1$1.invoke(MainActivity.kt:123)
        at com.guru.composecookbook.ComposableSingletons$MainActivityKt$lambda-1$1.invoke(MainActivity.kt:122)

I think maybe it has something to do with the library's compose version. Because in the composer its parameter is Integer, not String:

image

Gurupreet commented 3 years ago

Yes I think it's related to versioning let me try to reproduce and check on it :)

wiryadev commented 3 years ago

Yes I think it's related to versioning let me try to reproduce and check on it :)

Thanks for that. Btw, i tried to update FontAwesomeCompose dependencies versioning. I hope you could check on that :D

csf033 commented 3 years ago

Describe the bug The app force closed the first time it try to launch.

To Reproduce use the latest master branch (by the time this issue created) and run it

Screenshots image

Additional context Here is the full log. It points out to getFontFamily function and i think it is because the Font has multiple implementation. See this screenshot:

image

image

Has the problem been solved?

Gurupreet commented 3 years ago

Let me check on this today and try to fix.

Gurupreet commented 3 years ago

Updated the fontAwesomeCompose to latest version. This issue should be resolved please try with new changes.

wiryadev commented 3 years ago

Updated the fontAwesomeCompose to latest version. This issue should be resolved please try with new changes.

Thanks, the issue is gone now