I'm working in an app. The app works in Android 7.x.x but when I try to run the app in the Android 5.x.x app crashed. I think this is happening because the compileSdkVersion
is API 25. When I try to to change this to API 21 (ANDROID 5), I have some errors. What can I do to my app work in Android 5?
ps: I don't know if the app is working in Android 6, but probably is not working.
build.gradle:
android {
compileSdkVersion 25
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "project.id"
minSdkVersion 16
targetSdkVersion 16
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
When I try to change the compileSdkVersion
to API 21, I have this errors:
Error:resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found.
Error:resource android:style/TextAppearance.Material.Widget.Button.Colored not found.
Error:resource android:style/TextAppearance.Material.Widget.Button.Inverse not found.
Error:resource android:style/Widget.Material.Button.Colored not found.
Error:failed linking references.
Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:Execution failed for task ':app:processDebugResources'.
Failed to execute aapt