DroidKaigi / conference-app-2024

The Official Conference App for DroidKaigi 2024
Apache License 2.0
458 stars 200 forks source link

themes.xml of app-android has lint error. #967

Closed Aniokrait closed 2 months ago

Aniokrait commented 2 months ago

Overview

Lint found errors in themes.xml and it makes build fail.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app-android:lintDevDebug'.
> Lint found errors in the project; aborting build.

  Fix the issues identified by lint, or create a baseline to see only new errors.
  To create a baseline, run `gradlew updateLintBaseline` after adding the following to the module's build.gradle file:
  ```
  android {
      lint {
          baseline = file("lint-baseline.xml")
      }
  }
  ```
  For more details, see https://developer.android.com/studio/write/lint#snapshot

  Lint found 1 errors, 49 warnings. First failure:

  /Users/tak/Documents/develop/droidkaigi/2024/conference-app-2024/app-android/src/main/res/values/themes.xml:9: Error: android:windowOptOutEdgeToEdgeEnforcement requires API level 35 (current min is 24) [NewApi]
          <item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
 Explanation for issues of type "NewApi":
 This check scans through all the Android API calls in the application and
 warns about any calls that are not available on all versions targeted by
 this application (according to its minimum SDK attribute in the manifest).

 If you really want to use this API and don't need to support older devices
 just set the minSdkVersion in your build.gradle or AndroidManifest.xml
 files.

 If your code is deliberately accessing newer APIs, and you have ensured
 (e.g. with conditional execution) that this code will only ever be called
 on a supported platform, then you can annotate your class or method with
 the @TargetApi annotation specifying the local minimum SDK to apply, such
 as @TargetApi(11), such that this check considers 11 rather than your
 manifest file's minimum SDK as the required API level.

 If you are deliberately setting android: attributes in style definitions,
 make sure you place this in a values-vNN folder in order to avoid running
 into runtime conflicts on certain devices where manufacturers have added
 custom attributes whose ids conflict with the new ones on later platforms.

 Similarly, you can use tools:targetApi="11" in an XML file to indicate that
 the element will only be inflated in an adequate context.
mannodermaus commented 2 months ago