Closed keyur9779 closed 2 years ago
Hey @keyur9779,
I just checked the demo project works fine for my environment. It seems your Gradle system couldn't download the dependency of the kotlin-refleciton
. Could you check out your version of Kotlin in your Android Studio? You must use 1.5.10
or higher in the demo project.
Hi Sir,
Yes, I'm using latest kotlin version(1.6.10), and I have also tried with version 1.5.10 but it didn't worked. Please follow below steps in android -11
Log :
kotlin.jvm.KotlinReflectionNotSupportedError: Kotlin reflection implementation is not found at runtime. Make sure you have kotlin-reflect.jar in the classpath
at kotlin.jvm.internal.CallableReference.getReflected(CallableReference.java:98)
at kotlin.jvm.internal.PropertyReference.getReflected(PropertyReference.java:31)
at kotlin.jvm.internal.PropertyReference1.getGetter(PropertyReference1.java:40)
at kotlin.jvm.internal.PropertyReference1.getGetter(PropertyReference1.java:12)
at com.skydoves.bindables.BindingManager.getBindingIdByProperty$bindables_debug(BindingManager.kt:73)
at com.skydoves.bindables.StateFlowBindingPropertyId.provideDelegate(FlowBindingProperty.kt:234)
at com.skydoves.bindablesdemo.MainViewModel.
Hmm, I have the same device and I followed your processes and it works as well. Then could you build by adding the below dependency on the app's build.gradle file? Or by changing the compile options to Java 11.
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '11'
}
implementation "org.jetbrains.kotlin:kotlin-reflect:$versions.kotlin"
And I can see the error that you attached is related to Hilt
.
Also, you can try the new version of the Hilt (2.40.5
)
Hi Sir,
No Luck,
I have updated gradle files based on your 2 inputs, and same issue.
Thank you
Hi Sir,
I have tried your last commit which work very fine with android studio version(arctic fox).
Thank you.
Please complete the following information:
Describe the Bug: App keeps crashing when launching 2nd time while development.
You can try running current sample version in any android 11 to check the below issue.
kotlin.jvm.KotlinReflectionNotSupportedError: Kotlin reflection implementation is not found at runtime. Make sure you have kotlin-reflect.jar in the classpath
Below is class and line number where it crases,
Class : BindingManager, LineNumber : 73( it.getter.hasAnnotation()). - It crases due to getter method of reflection jar.