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

[BUG] error: cannot access KMappedMarker #64

Open
jpage4500 opened this issue Jun 19, 2020 · 3 comments
Open

[BUG] error: cannot access KMappedMarker #64

jpage4500 opened this issue Jun 19, 2020 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@jpage4500
Copy link

This one is confusing me.. I was using the color picker just fine yesterday and now today the project is failing to build with the compiler error:

/Users/jpage/working/projects/hubitat-dashboard/app/src/main/java/com/jpage4500/hubitat/ui/fragments/DashboardFragment.java:654: error: cannot access KMappedMarker
        group.registerPicker(dialogLayout.colorSeekBar);
             ^
  class file for kotlin.jvm.internal.markers.KMappedMarker not found

It's complaining about the lines here:

        PickerGroup<IntegerHSLColor> group = new PickerGroup<>();
        group.registerPicker(dialogLayout.colorSeekBar);
        group.registerPicker(dialogLayout.saturationSeekBar);
        group.registerPicker(dialogLayout.lightnessSeekBar);

I imagine this isn't related to your library since it was building just fine yesterday. But, I can't figure out what changed or why it's now all of the sudden failing to compile so I figured someone here might have an idea why

@jpage4500
Copy link
Author

FWIW - I did notice when implementing this that there was no 'registerPickers' method like is shown in the example. My app is in Java and not Kotlin though. Anyway, registerPicker() did work just fine but figured I'd mention that too..

// Group pickers with PickerGroup to automatically synchronize color across them
val group = PickerGroup<IntegerHSLColor>().also {
  it.registerPickers(
    hueSeekBar,
    saturationSeekBar,
    lightnessSeekBar,
    alphaSeekBar
  )
}

@smelfungus smelfungus self-assigned this Jun 19, 2020
@smelfungus smelfungus added the bug Something isn't working label Jun 19, 2020
@jpage4500
Copy link
Author

So, I got it to build again. I looked at the build.config files in the demo project and added these lines to mine:

apply plugin: "kotlin-android"
apply plugin: "kotlin-android-extensions"

and

        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72"

The crazy thing is.. why it has been working without them.. Guessing this is just a Kotlin thing though and not related to this project

I did see that Android Studio updated a kotlin plugin/library recently so maybe that's related

@smelfungus
Copy link
Member

@jpage4500, thank you for reporting this.
Wonderful! Great catch on registerPickers, I will check the docs and API.
I will also double-check on what plugins/classpath are needed to make it work with Java and add that to the docs too 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants