I am developing android application with following app build gradle configuration:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.test.app"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'io.reactivex:rxandroid:1.1.0'
compile 'io.reactivex:rxjava:1.1.0'
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.android.support:support-v4:23.2.0'
compile 'com.google.code.gson:gson:2.6.2'
compile 'org.apache.commons:commons-lang3:3.4'
compile 'com.android.support:design:23.0.0'
}
and simple PreferenceFragment with xml configuration:
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<CheckBoxPreference android:title="Application Updates"
android:defaultValue="false"
android:summary="Simple check box preference."
android:key="applicationUpdates" />
When I run app on device with api level 23 everything is ok but when I run the same code on emulator with api 15 I get error:
03-09 19:38:01.205 1541-1541/com.test.app E/AndroidRuntime: android.view.InflateException: Binary XML file line #19: Error inflating class android.widget.CheckBox ... some code ... 03-09 19:38:01.205 1541-1541/com.test.app E/AndroidRuntime: Caused by: java.lang.reflect.InvocationTargetException ... some code ... 03-09 19:38:01.205 1541-1541/com.test.app E/AndroidRuntime: Caused by: android.content.res.Resources$NotFoundException: File res/drawable/abc_btn_check_mat
I think that something is wrong with material design library but I am not sure and I don't know how to solve this problem. I want to run app on devices with sdk 15 but I can't. How I can fix this problem?
PS. When I remove CheckBoxPreference from xml configuration my app i working on api 15 and api 23.