Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Lint] Call requires API level 24 (current min is 23): java.lang.Iterable#forEach [NewApi] #664

Open
riflockle7 opened this issue Oct 14, 2023 · 0 comments
Labels

Comments

@riflockle7
Copy link
Collaborator

 /.../duckie-android/feature/home/src/main/kotlin/team/duckie/app/android/feature/home/screen/search/SearchMainScreen.kt:154: Error: Call requires API level 24 (current min is 23): java.lang.Iterable#forEach [NewApi]
                  state.popularTags.forEach { tag ->
                                    ~~~~~~~
  
     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.
  
  
  The full lint text report is located at:
    /Users/user/Develop_Document/android_studio_workspace/duckie-android/feature/home/build/intermediates/lint_intermediate_text_report/debug/lint-results-debug.txt

@riflockle7 riflockle7 added the bug 버그 label Oct 14, 2023
@riflockle7 riflockle7 changed the title Call requires API level 24 (current min is 23): java.lang.Iterable#forEach [NewApi] [Lint] Call requires API level 24 (current min is 23): java.lang.Iterable#forEach [NewApi] Oct 14, 2023
@riflockle7 riflockle7 added lint and removed bug 버그 labels Oct 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant