Cope with Google targetSdkVersion requirements
Come November 2018 Google tools have initiated their "targetSdkVersion timebomb" and apps already fail to update:
app/build.gradle:15: Error: Google Play requires that apps target API level 26 or higher.
[ExpiredTargetSdkVersion]
targetSdkVersion 23
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Explanation for issues of type "ExpiredTargetSdkVersion":
As of the second half of 2018, Google Play requires that new apps and app
updates target API level 26 or higher.
Configuring your app to target a recent API level ensures that users
benefit from significant security and performance improvements, while still
allowing your app to run on older Android versions (down to the
minSdkVersion).
To update your targetSdkVersion, follow the steps from "Meeting Google Play
requirements for target API level",
https://developer.android.com/distribute/best-practices/develop/target-sdk.
html
https://support.google.com/googleplay/android-developer/answer/113469#targetsdk
https://support.google.com/googleplay/android-developer/answer/113469#targetsdk
https://developer.android.com/distribute/best-practices/develop/target-sdk.html
1 errors, 0 warnings
:app:lintVitalRelease FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:lintVitalRelease'.
> Lint found fatal errors while assembling a release target.
To proceed, either fix the issues identified by lint, or modify your build script as follows:
...
android {
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
}
...
Temporary fix: prebuild=sed -i -e '10 ilistOptions{abortOnError false}' build.gradle
(adapted per app)
Why temporary? We are hiding/ignoring actual errors too, not sure that's wanted.
So, can this be handled better? Is there a hidden switch to bypass it? ( Until the free stack comes to free us all, that is :) )
Edited by Licaon_Kter