I wanna use RxJava binding APIs for Android UI widgets in my project.
Therefore following the guidance as per this site 'https://github.com/JakeWharton/RxBinding'
但是我无法在我的Kotlin文件中导入任何Android UI小部件. Where as its working fine if I am consuming these widgets in Java File.个 因此,没有找到这个问题的实际情况.
For reference following are the gradle file and class files(both kotlin and java) using in same project
build.gradle
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
implementation 'androidx.core:core-ktx:1.2.0-alpha01'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
implementation 'io.reactivex.rxjava2:rxjava:2.2.8'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
//RxBinding
implementation 'com.jakewharton.rxbinding3:rxbinding:3.0.0-alpha2'
}
BindingExample.java class
RxBindingExample.kt class个
Have tried exploring this issue on S.O. but questions or solutions are available for previous version of lib 'com.jakewharton.rxbinding2:rxbinding'