clone慢的可以用 gitee链接 https://gitee.com/hegaojian/MvvmHelper
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
apply plugin: 'kotlin-kapt'
...
dependencies {
...
implementation 'com.github.hegaojian:MvvmHelper:1.2.0'
kapt 'com.github.liujingxing.rxhttp:rxhttp-compiler:3.2.3'
}
AndroidStudio 4.0 以下版本------>
android {
...
dataBinding {
enabled = true //可选 不用可以不写
}
viewBinding {
enabled = true //可选 不用可以不写
}
}
AndroidStudio 4.0及以上版本 ------>
android {
...
buildFeatures {
dataBinding = true //可选 不用可以不写
viewBinding = true //可选 不用可以不写
}
}
MvvmHelper.init(this,BuildConfig.DEBUG)
-keepclassmembers class * implements androidx.viewbinding.ViewBinding {
public static * inflate(android.view.LayoutInflater);
public static * inflate(android.view.LayoutInflater, android.view.ViewGroup, boolean);
public static * bind(android.view.View);
}