Flutter builds with plug-in com.android.application >= 8.13.0 will fail if the keep_screen_on pub is installed because of the hardcoded compileSdk set to 33:
For the new version of the plug-in, a minimum compileSdk of 34 is required.
The following kind of errors are observed when upgrading to 8.13.0:
Dependency 'androidx.fragment:fragment:1.7.1' requires libraries and applications that
depend on it to compile against version 34 or later of the
Android APIs.
:keep_screen_on is currently compiled against android-33.
Recommended action: Update this project to use a newer compileSdk
of at least 34, for example 36.
Note that updating a library or application's compileSdk (which
allows newer APIs to be used) can be done separately from updating
targetSdk (which opts the app in to new runtime behavior) and
minSdk (which determines which devices the app can be installed
on).
Please note that this happens for a large number of androidx.* related libraries, not specifically androidx.fragment:fragment:1.7.1.
Flutter builds with plug-in
com.android.application>= 8.13.0 will fail if thekeep_screen_onpub is installed because of the hardcodedcompileSdkset to 33:flutter_keep_screen_on/keep_screen_on/android/build.gradle
Line 32 in 7507674
For the new version of the plug-in, a minimum compileSdk of 34 is required.
The following kind of errors are observed when upgrading to 8.13.0:
Please note that this happens for a large number of
androidx.*related libraries, not specificallyandroidx.fragment:fragment:1.7.1.