Skip to content
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

Runtime crash when not running gradle task before using Composable #858

Closed
5 tasks
tassilo-posegga opened this issue Mar 17, 2023 · 3 comments
Closed
5 tasks

Comments

@tassilo-posegga
Copy link
Contributor

tassilo-posegga commented Mar 17, 2023

About this issue

Inititalizing the LibrariesContainer() without previously manually creating the the json file crashes the app at runtime.

LibrariesContainer(
            modifier = Modifier
                .padding(paddingValues)
                .fillMaxSize(),
            header = { item { Header() } },
            showVersion = false,
            showAuthor = false,
            showLicenseBadges = false,
            colors = LibraryDefaults.libraryColors(
                backgroundColor = KDSTheme.colors.background.base,
                contentColor = KDSTheme.colors.text.primary
            )
        )
 java.lang.IllegalStateException: Please provide the required library data via the available APIs.
                                                                                                    Depending on the platform this can be done for example via `LibsBuilder().withJson()`.

I didn't apply any options to the aboutLibraries block

I was under the impression that the plugin would take care of creating necessary assets.
Does that mean that I need to recreate the json file with every new build?

EDIT:

I figured the crash is gone when adding the plugin to the app level build.gradle, but the libs stay empty in the UI/while debugging the libs value. When generating the aboutlibraries.json file manually (which is also empty as stated in another issue #800 ) and running the app afterwards it complains about duplicate resources.

Details

- Used library version: 10.6.1

  • Android

Checklist

@mikepenz
Copy link
Owner

Thank you. This problem seems to be possibly more related to these issues:

Overall having the plugin configured to generate the json and then having it as part of git may be a workaround (e.g. it not being automatically registered as part of the Android build pipelines)

@mikepenz
Copy link
Owner

@GoldenSoju if you run the gradle task manually https://github.com/mikepenz/AboutLibraries#gradle-api would the exports work?

Possibly the enterprise section could help in the meantime: https://github.com/mikepenz/AboutLibraries#enterprise

@mikepenz
Copy link
Owner

mikepenz commented Jul 8, 2023

Closing for inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants