Omico/androidx-compose-material3-pullrefresh

null cannot be cast to non-null type kotlin.String

Closed this issue · 8 comments

I tried doing the following:

In my settings.gradle.kt:

includeBuild("libraries/androidx-compose-material3-pullrefresh") {
    dependencySubstitution {
        substitute(module("me.omico.lux:lux-androidx-compose-material3-pullrefresh")).using(project(":library"))
    }
}

I downloaded, and added the git project into the libraries folder

and then in build.gradle.kt:

implementation("me.omico.lux:lux-androidx-compose-material3-pullrefresh")

and Syncing it I get the followning message:

null cannot be cast to non-null type kotlin.String
null cannot be cast to non-null type kotlin.String

Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)

Re-download dependencies and sync project (requires network)
The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.

Stop Gradle build processes (requires restart)
Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.

In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
Omico commented

Copy local.properties.template to local.properties and follow the instructions in the file to fit your environment.

Did you do this step?

@Omico I did not. Sorry, my bad I missed that part somehow, but I will try it now and let you know how it went.

Still doesn't work I did the following in my local.properties file:

sdk.dir=C\:\\Users\\Ive\\AppData\\Local\\Android\\Sdk
project.android.gradle.plugin.version=8.1.0
project.compose.bom.version=2023.08.00
project.compose.compiler.version=1.4.3
project.kotlin.version=1.8.10
Omico commented

Instead of your root project folder, it should be placed inside of the androidx-compose-material3-pullrefresh folder. If this is still not working, please provide me a minimal reproduce project for debugging.

Omico commented

Closed due to no response.

I had the same problem possibly. The issue was that I didn't have:
project.gradle.enterprise.plugin.version=3.15
in my local.properties.

Omico commented

I had the same problem possibly. The issue was that I didn't have: project.gradle.enterprise.plugin.version=3.15 in my local.properties.

Thanks for your comment. I will soon provide a new structure and a complete usage example, which should reduce confusion for users.

Omico commented

@juliusspencer The latest commit came up with new instructions. I tested it locally, and it should be run as expected. Would you mind trying it out? Just make sure you read it properly. We should declare includeBuild("<androidx-compose-material3-pullrefresh-path>/library") now.