-
Notifications
You must be signed in to change notification settings - Fork 15
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
Can't access delegate
in bridge component
#86
Comments
@joemasilotti is this by chance an older project? I wonder if updating your Android Gradle Plugin and Kotlin dependencies would help here? The Hotwire Native repo is running these versions: To update AGP, you can go to Android Studio -> Tools -> AGP Upgrade Assistant |
You can also try Project -> Rebuild Project and restarting Android Studio. I think this is a random compiler/cache issue. |
Thanks Jay! It looks like Kotlin 2.0.0 might be the issue? Here's a new project with the Hotwire Native dependency, upgraded to Kotlin 2.0.0, and the code snippet above. Of note, upgrading the demo app to 2.0.0 does not seem to reproduce the issue, oddly. |
This also makes me wonder if we should make |
I came across this issue yesterday when writing this I assumed it was an issue with my compiler configuration, so I simply called the variable class FormComponent(
name: String,
private val formDelegate: BridgeDelegate<HotwireDestination>
) : BridgeComponent<HotwireDestination>(name, formDelegate) {
...
} |
Oooh, good idea @williamkennedy! That works for me (for now). I think it gives more power to my previous comment about making the property |
I've copy-pasted the following into an existing Hotwire Native Android app from the Bridge Components section of the guide.
When I try to run the app it fails with the following error:
If I change
private val delegate
todelegate
then I get the following error:I'm extra confused because if I copy paste this into a brand new Hotwire Native app I don't get the error. Same goes for the demo app.
Any ideas what could be causing this? I'm at a loss as to what I could have configured, or dependency I added, to change something so fundamental about Kotlin. I'm using Hotwire Native Android v1.1.1.
The text was updated successfully, but these errors were encountered: