-
-
Notifications
You must be signed in to change notification settings - Fork 60
Fix sample app crashing at startup due to missing aboutlibraries.json. #468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
+ Crash:
java.lang.IllegalStateException: Please provide the required library data via the available APIs.
Depending on the platform this can be done for example via `Libs.Builder().withJson()`.
For Android there exists an `Libs.Builder().withContext(context).build()`, automatically loading the `aboutlibraries.json` file from the `raw` resources folder.
When using compose or other parent modules, please check their corresponding APIs.
at com.mikepenz.aboutlibraries.Libs$Builder.build(Libs.kt:44)
at com.mikepenz.markdown.MainActivity.onCreate$lambda$0(MainActivity.kt:17)
...
|
Thanks @johnjohndoe . Do you have some additional details. the sample app gets the file generated via the plugin. testing it locally for me works 🤔 |
|
The sample app crashes every time when I run it on my device (Android 16). |
|
Built from the |
|
unable to reproduce this issue |
|
Yes, from the |
|
hmmm I wonder if somehow the plugin doesn't generate, can you try a clean build please? |
|
Both clean builds from 2025-11-10 21:51:57.168 11377-11377 kepenz.markdown com.mikepenz.markdown I Late-enabling -Xcheck:jni
2025-11-10 21:51:57.206 11377-11377 kepenz.markdown com.mikepenz.markdown I Using CollectorTypeCC GC.
2025-11-10 21:51:57.243 11377-11377 nativeloader com.mikepenz.markdown D Load libframework-connectivity-tiramisu-jni.so using APEX ns com_android_tethering for caller /apex/com.android.tethering/javalib/framework-connectivity-t.jar: ok
2025-11-10 21:51:57.256 11377-11377 ActivityThread com.mikepenz.markdown D setConscryptValidator
2025-11-10 21:51:57.257 11377-11377 ActivityThread com.mikepenz.markdown D setConscryptValidator - put
2025-11-10 21:51:57.312 11377-11377 ActivityThread com.mikepenz.markdown I Relaunch all activities: onCoreSettingsChange
2025-11-10 21:51:57.314 11377-11377 Compatibil...geReporter com.mikepenz.markdown D Compat change id reported: 171979766; UID 10301; state: ENABLED
2025-11-10 21:51:57.316 11377-11377 Compatibil...geReporter com.mikepenz.markdown D Compat change id reported: 242716250; UID 10301; state: ENABLED
2025-11-10 21:51:57.649 11377-11377 nativeloader com.mikepenz.markdown D Configuring clns-6 for other apk /data/app/~~x1T2f0J5aeDEzADCfmJJ7Q==/com.mikepenz.markdown-LHyB4SoXr2YzaMjJNyqeCQ==/base.apk. target_sdk_version=36, uses_libraries=, library_path=/data/app/~~x1T2f0J5aeDEzADCfmJJ7Q==/com.mikepenz.markdown-LHyB4SoXr2YzaMjJNyqeCQ==/lib/arm64:/data/app/~~x1T2f0J5aeDEzADCfmJJ7Q==/com.mikepenz.markdown-LHyB4SoXr2YzaMjJNyqeCQ==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/com.mikepenz.markdown
2025-11-10 21:51:57.661 11377-11377 nativeloader com.mikepenz.markdown D Load libframework-connectivity-jni.so using APEX ns com_android_tethering for caller /apex/com.android.tethering/javalib/framework-connectivity.jar: ok
2025-11-10 21:51:57.671 11377-11377 GraphicsEnvironment com.mikepenz.markdown V Currently set values for:
2025-11-10 21:51:57.671 11377-11377 GraphicsEnvironment com.mikepenz.markdown V angle_gl_driver_selection_pkgs=[]
2025-11-10 21:51:57.671 11377-11377 GraphicsEnvironment com.mikepenz.markdown V angle_gl_driver_selection_values=[]
2025-11-10 21:51:57.672 11377-11377 GraphicsEnvironment com.mikepenz.markdown V ANGLE GameManagerService for com.mikepenz.markdown: false
2025-11-10 21:51:57.672 11377-11377 GraphicsEnvironment com.mikepenz.markdown V com.mikepenz.markdown is not listed in per-application setting
2025-11-10 21:51:57.672 11377-11377 GraphicsEnvironment com.mikepenz.markdown V Updatable production driver is not supported on the device.
2025-11-10 21:51:57.701 11377-11479 ResourcesOffloading com.mikepenz.markdown W An exception occurred : (Explain with AI)
android.content.res.Resources$NotFoundException: Resource ID #0x7f070076
at android.content.res.ResourcesImpl.getValueForDensity(ResourcesImpl.java:271)
at android.content.res.Resources.offloadDrawable(Resources.java:2945)
at android.app.ResourcesOffloading$ResourcesOffloadingRunnable.run(ResourcesOffloading.java:94)
at java.lang.Thread.run(Thread.java:1119)
2025-11-10 21:51:57.755 11377-11377 OpenGLRenderer com.mikepenz.markdown D HWUI - treat SMPTE_170M as sRGB
2025-11-10 21:51:57.783 11377-11491 AdrenoGLES-0 com.mikepenz.markdown I QUALCOMM build : 9ad1b67875, Ib48d2dada6
Build Date : 05/11/25
OpenGL ES Shader Compiler Version: EV031.35.01.12
Local Branch :
Remote Branch : refs/tags/AU_LINUX_ANDROID_LA.UM.9.14.11.00.00.571.148
Remote Branch : NONE
Reconstruct Branch : NOTHING
2025-11-10 21:51:57.783 11377-11491 AdrenoGLES-0 com.mikepenz.markdown I Build Config : S P 10.0.7 AArch64
2025-11-10 21:51:57.783 11377-11491 AdrenoGLES-0 com.mikepenz.markdown I Driver Path : /vendor/lib64/egl/libGLESv2_adreno.so
2025-11-10 21:51:57.816 11377-11377 kepenz.markdown com.mikepenz.markdown E Invalid resource ID 0x00000000.
2025-11-10 21:51:57.834 11377-11491 AdrenoGLES-0 com.mikepenz.markdown I PFP: 0x016dc094, ME: 0x00000000
2025-11-10 21:51:57.842 11377-11377 DecorView com.mikepenz.markdown I setWindowBackground: isPopOver=false color=fffafafa d=android.graphics.drawable.ColorDrawable@da8fd45
2025-11-10 21:51:57.850 11377-11377 PhoneWindow com.mikepenz.markdown D forceLight changed to false [] from com.android.internal.policy.PhoneWindow.updateForceLightNavigationBar:4373 com.android.internal.policy.PhoneWindow.setNavigationBarColor:4064 androidx.activity.EdgeToEdgeApi29.setUp:322 androidx.activity.EdgeToEdge.enable:95 androidx.activity.EdgeToEdge.enable$default:69
2025-11-10 21:51:57.906 11377-11377 Compatibil...geReporter com.mikepenz.markdown D Compat change id reported: 237531167; UID 10301; state: DISABLED
2025-11-10 21:51:57.946 11377-11491 NativeCust...ncyManager com.mikepenz.markdown D [NativeCFMS] BpCustomFrequencyManager::BpCustomFrequencyManager()
2025-11-10 21:51:57.957 11377-11377 InsetsController com.mikepenz.markdown I onStateChanged: host=com.mikepenz.markdown/com.mikepenz.markdown.MainActivity, from=android.view.ViewRootImpl.setView:1753, state=InsetsState: {mDisplayFrame=Rect(0, 0 - 2560, 1600), mDisplayCutout=DisplayCutout{insets=Rect(0, 0 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]} cutoutPathParserInfo={CutoutPathParserInfo{displayWidth=0 displayHeight=0 physicalDisplayWidth=0 physicalDisplayHeight=0 density={0.0} cutoutSpec={} rotation={0} scale={0.0} physicalPixelDisplaySizeRatio={0.0}}}}, mRoundedCorners=RoundedCorners{[RoundedCorner{position=TopLeft, radius=28, center=Point(28, 28)}, RoundedCorner{position=TopRight, radius=28, center=Point(2532, 28)}, RoundedCorner{position=BottomRight, radius=28, center=Point(2532, 1572)}, RoundedCorner{position=BottomLeft, radius=28, center=Point(28, 1572)}]} mRoundedCornerFrame=Rect(0, 0 - 2560, 1600), mPrivacyIndicatorBounds=PrivacyIndicatorBounds {static bounds=Rect(2466, 0 - 2560, 51) rotation=1}, mDisplayShape=DisplayShape{ spec=-311912193 displayWidth=1600 displayHeight=2560 physicalPixelDisplaySizeRatio=1.0 rotation=1 offsetX=0 offsetY=0 scale=1.0}, mSources= { InsetsSource: {eb3d0001 mType=navigationBars mFrame=[0,1568][2560,1600] mVisible=true mFlags=[SUPPRESS_SCRIM]}, InsetsSource: {eb3d0004 mType=systemGestures mFrame=[0,0][63,1600] mVisible=true mFlags=[]}, InsetsSource: {eb3d0005 mType=mandatorySystemGestures mFrame=[0,1532][2560,1600] mVisible=true mFlags=[]}, InsetsSource: {eb3d0006 mType=tappableElement mFrame=[0,0][0,0] mVisible=true mFlags=[]}, InsetsSource: {eb3d0024 mType=systemGestures mFrame=[2497,0][2560,1600] mVisible=true mFlags=[]}, InsetsSource: {f8f70000 mType=statusBars mFrame=[0,0][2560,51] mVisible=true mFlags=[]}, InsetsSource: {f8f70005 mType=mandatorySystemGestures mFrame=[0,0][2560,51] mVisible=true mFlags=[]}, InsetsSource: {f8f70006 mType=tappableElement mFrame=[0,0][2560,51] mVisible=true mFlags=[]} }
2025-11-10 21:51:57.958 11377-11377 ViewRootIm...nActivity] com.mikepenz.markdown I synced displayState. AttachInfo displayState=2
2025-11-10 21:51:57.959 11377-11377 ViewRootIm...nActivity] com.mikepenz.markdown I setView = com.android.internal.policy.DecorView@5bd7452 TM=true
2025-11-10 21:51:57.959 11377-11377 IDS_TAG com.mikepenz.markdown I Clearing training data of android.app.Application@487b323
2025-11-10 21:51:57.961 11377-11377 IDS_TAG com.mikepenz.markdown I Starting IDS observe window
2025-11-10 21:51:57.962 11377-11377 IDS_TAG com.mikepenz.markdown I Getting Shared Preference for android.app.Application@487b323 uid = 10301
2025-11-10 21:51:57.965 11377-11377 IDS_TAG com.mikepenz.markdown I App android.app.Application@487b323 has not finished training
2025-11-10 21:51:57.967 11377-11377 IDS_TAG com.mikepenz.markdown I Closing IDS observe window
2025-11-10 21:51:57.967 11377-11377 IDS_TAG com.mikepenz.markdown I Getting Shared Preference for android.app.Application@487b323 uid = 10301
2025-11-10 21:51:57.969 11377-11377 IDS_TAG com.mikepenz.markdown I IDS count updated to 1 for android.app.Application@487b323
2025-11-10 21:51:58.146 11377-11377 kepenz.markdown com.mikepenz.markdown I hiddenapi: Accessing hidden method Landroid/os/SystemProperties;->addChangeCallback(Ljava/lang/Runnable;)V (runtime_flags=0, domain=platform, api=unsupported) from Landroidx/compose/ui/platform/AndroidComposeView$Companion; (domain=app) using reflection: allowed
2025-11-10 21:51:58.161 11377-11377 kepenz.markdown com.mikepenz.markdown E Invalid resource ID 0x00000000.
2025-11-10 21:51:58.161 11377-11377 AboutLibraries com.mikepenz.markdown E Unable to retrieve library information given the `raw` resource identifier.
Please make sure either the gradle plugin is properly set up, or the file is manually provided.
2025-11-10 21:51:58.161 11377-11377 System.out com.mikepenz.markdown I Could not retrieve libraries
2025-11-10 21:51:58.163 11377-11377 AndroidRuntime com.mikepenz.markdown D Shutting down VM
2025-11-10 21:51:58.166 11377-11377 AndroidRuntime com.mikepenz.markdown E FATAL EXCEPTION: main (Explain with AI)
Process: com.mikepenz.markdown, PID: 11377
java.lang.IllegalStateException: Please provide the required library data via the available APIs.
Depending on the platform this can be done for example via `Libs.Builder().withJson()`.
For Android there exists an `Libs.Builder().withContext(context).build()`, automatically loading the `aboutlibraries.json` file from the `raw` resources folder.
When using compose or other parent modules, please check their corresponding APIs.
at com.mikepenz.aboutlibraries.Libs$Builder.build(Libs.kt:44)
at com.mikepenz.markdown.MainActivity.onCreate$lambda$0(MainActivity.kt:17)
at com.mikepenz.markdown.MainActivity.$r8$lambda$kks9aaYmGwkXyYDBfQo-tm0FTfM(Unknown Source:0)
at com.mikepenz.markdown.MainActivity$$ExternalSyntheticLambda0.invoke(D8$$SyntheticClass:0)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:121)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:51)
at androidx.compose.ui.platform.ComposeView.Content(ComposeView.android.kt:431)
at androidx.compose.ui.platform.AbstractComposeView$ensureCompositionCreated$1.invoke(ComposeView.android.kt:250)
at androidx.compose.ui.platform.AbstractComposeView$ensureCompositionCreated$1.invoke(ComposeView.android.kt:250)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:121)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:51)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:370)
at androidx.compose.ui.platform.CompositionLocalsKt.ProvideCommonCompositionLocals(CompositionLocals.kt:216)
at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt$ProvideAndroidCompositionLocals$3.invoke(AndroidCompositionLocals.android.kt:145)
at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt$ProvideAndroidCompositionLocals$3.invoke(AndroidCompositionLocals.android.kt:144)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:121)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:51)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:370)
at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt.ProvideAndroidCompositionLocals(AndroidCompositionLocals.android.kt:133)
at androidx.compose.ui.platform.WrappedComposition$setContent$1$1$3.invoke(Wrapper.android.kt:140)
at androidx.compose.ui.platform.WrappedComposition$setContent$1$1$3.invoke(Wrapper.android.kt:139)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:121)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:51)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:390)
at androidx.compose.ui.platform.WrappedComposition$setContent$1$1.invoke(Wrapper.android.kt:139)
at androidx.compose.ui.platform.WrappedComposition$setContent$1$1.invoke(Wrapper.android.kt:123)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:121)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:51)
at androidx.compose.runtime.internal.Expect_jvmKt.invokeComposable(Expect.jvm.kt:24)
at androidx.compose.runtime.ComposerImpl.doCompose-aFTiNEg(Composer.kt:3843)
at androidx.compose.runtime.ComposerImpl.composeContent--ZbOJvo$runtime(Composer.kt:3747)
at androidx.compose.runtime.CompositionImpl.composeContent(Composition.kt:832)
at androidx.compose.runtime.Recomposer.composeInitial$runtime(Recomposer.kt:1233)
at androidx.compose.runtime.CompositionImpl.composeInitial(Composition.kt:672)
at androidx.compose.runtime.CompositionImpl.setContent(Composition.kt:639)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:123)
2025-11-10 21:51:58.167 11377-11377 AndroidRuntime com.mikepenz.markdown E at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:114) (Explain with AI)
at androidx.compose.ui.platform.AndroidComposeView.setOnViewTreeOwnersAvailable(AndroidComposeView.android.kt:1990)
at androidx.compose.ui.platform.WrappedComposition.setContent(Wrapper.android.kt:114)
at androidx.compose.ui.platform.WrappedComposition.onStateChanged(Wrapper.android.kt:168)
at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.jvm.kt:313)
at androidx.lifecycle.LifecycleRegistry.addObserver(LifecycleRegistry.jvm.kt:191)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:121)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:114)
at androidx.compose.ui.platform.AndroidComposeView.onAttachedToWindow(AndroidComposeView.android.kt:2077)
at android.view.View.dispatchAttachedToWindow(View.java:23227)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3698)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3705)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3705)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3705)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3705)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3901)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:3288)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:11344)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1689)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1698)
at android.view.Choreographer.doCallbacks(Choreographer.java:1153)
at android.view.Choreographer.doFrame(Choreographer.java:1079)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1646)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:230)
at android.os.Looper.loop(Looper.java:319)
at android.app.ActivityThread.main(ActivityThread.java:8934)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:578)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
2025-11-10 21:51:58.203 11377-11377 Process com.mikepenz.markdown I Sending signal. PID: 11377 SIG: 9 |
|
that's very interesting. somehow the plugin doesn't appear to trigger the generation for you 🤔 |
Description
Fix sample app crashing at startup due to a missing
sample/android/src/main/res/raw/aboutlibraries.jsonfile.Crash
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Checklist: