1
我得到了如下的错误的Android MVVM:无法生成视图粘合剂
Error:cannot generate view binders java.lang.StringIndexOutOfBoundsException: String index out of range: -8
前几分钟,我的代码是运行良好,我能够运行该项目。我已经尝试了很多解决方案,因为通过了stackoverflow,但无法找到解决此问题的实际解决方案。
我的应用水平gradle这个就像
android {
compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION)
buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION
defaultConfig {
applicationId "com.xyz.abc"
minSdkVersion Integer.parseInt(project.ANDROID_BUILD_MIN_SDK_VERSION)
targetSdkVersion Integer.parseInt(project.ANDROID_BUILD_TARGET_SDK_VERSION)
versionCode 1
versionName "1.0"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
dataBinding {
enabled = true
}
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
}
}
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:26.1.0'
compile 'com.android.support:cardview-v7:26.1.0'
compile 'com.android.support:customtabs:26.1.0'
compile 'com.android.support:support-v4:26.1.0'
}
apply plugin: 'com.google.gms.google-services'
从你身边的任何输入的高度赞赏。
检查接受的答案https://stackoverflow.com/questions/33343411/data-binding-cannot-find-symbol-class-br/33414765 – Anonymous
@Anonymous不为我工作 –