5
gitpush
6y

I give up! Been trying to solve this shit for a week and still failed:

Using Android Data Binding, two-way binding and when I compile I receive this error:

Unknown class: java.lang.String

It was working without issues before upgrading Android Studio.

Anyone has a clue how to solve this shit?

By the way I'm using Kotlin, on Java it doesn't produce errors, and I'm not going to convert my project to Java ...

Comments
  • 1
    Update Android studio
  • 1
    Looks like you might be running into the same bug as this guy: https://bit.ly/2NovAUV

    Unfortunately there's no solution posted there as of yet.
  • 0
    @thevariableman issue started after applying latest update lol Don't think that's an option
  • 1
    @AlmondSauce yup exactly like his reminds me of those rants that "exact same problem of mine but no solution FUUUUUUUCK" lol
  • 1
    @gitpush Yeah. Kotlin's a lot more stable and generally better than it used to be, but I've still seen enough corner cases / weird oddities floating around like this that means I haven't yet committed any projects to it.
  • 0
    @AlmondSauce but what I don't understand it was all working without issues until the latest update. They even have kotlin samples for data binding in their docs, I replicated their example and it still doesn't work.

    On top of that, Android Studio tells me error on line 85, but the two-way binding is on line 84 + line 85 is empty.

    I removed gradle, .gradle, .idea invalidate cache and restart and still same issue, I disabled two-way binding and it just worked, but doing so means I need to modify lots of places in my app and that's not an option
  • 1
    This tends to happen to me when I compile project with j6 and run it with j9. Java version, java_home -- all looking correct?
  • 1
    @netikras Indeed I had some java and android dependencies causing this, which is fixed, now the problem is this:

    Type mismatch: inferred type is DataLayer.Models.Address? but PACKAGE_NAME.DataLayer.Models.Address? was expected

    I cannot understand that's my own damn model why data binding is ignoring initial package name?
Add Comment