rickclephas / KMP-ObservableViewModel

Library to use AndroidX/Kotlin ViewModels with SwiftUI
MIT License
569 stars 29 forks source link

Cannot access 'androidx.lifecycle.ViewModel' which is a supertype of 'com.example.account.AccountViewModel' #38

Closed vivart closed 1 year ago

vivart commented 1 year ago

First of all thanks for all the awesome libs. I have added this dependency in my shared folder. api("com.rickclephas.kmm:kmm-viewmodel-core:1.0.0-ALPHA-9") and created this class class AccountViewModel : KMMViewModel() {} and I am getting this error

Cannot access 'androidx.lifecycle.ViewModel' which is a supertype of 'com.example.account.AccountViewModel'. Check your module classpath for missing or conflicting dependencies

Am I missing some dependency or some configuration?

rickclephas commented 1 year ago

Hi sorry about that the current version has a small dependency issue (which will be fixed in the next release). For the temporary workaround please see https://github.com/rickclephas/KMM-ViewModel/issues/34#issuecomment-1584964585.

vivart commented 1 year ago

thanks working fine with workaround.

rickclephas commented 1 year ago

FYI this has been fixed in v1.0.0-ALPHA-10.