App works on API 26 but crashes on API 23 (marshmallow)

The application is working as fine without any unexpected behavior in API 26 emulator, but crashes in API 23. The app right when it starts. I'm fairly new to android so not quite sure what changes to make to adapt to API 23.

Here's my gradle

apply plugin: 'com.android.application'

android {

compileSdkVersion 26

defaultConfig {

applicationId "com.set.www.assignment_1_mobile"

minSdkVersion 15

targetSdkVersion 26

versionCode 1

versionName "1.0"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

}

buildTypes {

release {

minifyEnabled false

proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

}

}

}

dependencies {

implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation 'com.android.support.constraint:constraint-layout:1.0.2'

testImplementation 'junit:junit:4.12'

androidTestImplementation 'com.android.support.test:runner:1.0.1'

androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'

}

Here's the error log

java.lang.RuntimeException: Unable to start activity

ComponentInfo{com.set.www.assignment_1_mobile/com.set.www.assignment_1_mobile.MainActivity}:

android.view.InflateException: Binary XML file line #0: Binary XML

file line #0: Error inflating class...

Read More »

By: StackOverFlow - Saturday, 14 April

Related Posts