我在Android Lolipop上遇到了崩溃.
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.CharSequence android.content.res.StringBlock.get(int)' on a null object reference
at android.content.res.AssetManager.getResourceValue(AssetManager.java:213)
at android.content.res.Resources.getValue(Resources.java:1334)
at android.content.res.Resources.getValue(Resources.java:1323)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:2796)
at android.content.res.Resources.getLayout(Resources.java:1143)
at android.view.LayoutInflater.inflate(LayoutInflater.java:412)
Run Code Online (Sandbox Code Playgroud)
通常在充气视图时发生.有什么建议只在棒棒糖上发生吗?
我收到以下错误
错误:(3,0)原因:org/apache/commons/lang3/StringUtils
当我尝试在我的Android项目中添加数据绑定时.
我的依赖包括:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.0.0-alpha7'
classpath 'me.tatarka:gradle-retrolambda:3.2.2'
classpath 'com.android.databinding:dataBinder:1.0-rc1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Run Code Online (Sandbox Code Playgroud)
我的gradle包装器是:distributionUrl = https://services.gradle.org/distributions/gradle-2.2.1-all.zip
我的gradle文件:
apply plugin: 'com.android.application'
apply plugin: 'me.tatarka.retrolambda'
apply plugin: 'com.android.databinding'
android …
Run Code Online (Sandbox Code Playgroud)