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

[BUG]: Lint Error #4253

Closed
tmac24utm opened this issue Oct 23, 2024 · 3 comments · Fixed by #4257
Closed

[BUG]: Lint Error #4253

tmac24utm opened this issue Oct 23, 2024 · 3 comments · Fixed by #4257

Comments

@tmac24utm
Copy link

Version

6.7.0

What platforms are you having the problem on?

Android

System Version

Android

On what device are you experiencing the issue?

Simulator

Architecture

Old architecture

What happened?

I get the following error when running a gradle build. This has been happening since v6.6.0

> Task :react-native-video:compileReleaseJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/{name}/IdeaProjects/AwesomeProject/node_modules/react-native-video/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :react-native-video:lintReportDebug
Wrote HTML report to file:///Users/{name}/IdeaProjects/AwesomeProject/node_modules/react-native-video/android/buildOutput_a15d4dee7fc4eda61b91308cbb6a2e72/reports/lint-results-debug.html

> Task :react-native-video:lintDebug FAILED
Lint found 1 errors, 15 warnings. First failure:

/Users/{name}/IdeaProjects/AwesomeProject/node_modules/react-native-video/android/src/main/java/com/brentvatne/exoplayer/CMCDConfig.kt:18: Error: Must be one of: CmcdConfiguration.MODE_REQUEST_HEADER, CmcdConfiguration.MODE_QUERY_PARAMETER [WrongConstant]
            props.mode
            ~~~~~~~~~~

   Explanation for issues of type "WrongConstant":
   Ensures that when parameter in a method only allows a specific set of
   constants, calls obey those rules.


The full lint text report is located at:
  /Users/{name}/IdeaProjects/AwesomeProject/node_modules/react-native-video/android/buildOutput_a15d4dee7fc4eda61b91308cbb6a2e72/intermediates/lint_intermediate_text_report/debug/lintReportDebug/lint-results-debug.txt

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-video:lintDebug'.
> 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, 15 warnings. First failure:
  
  /Users/{name}/IdeaProjects/AwesomeProject/node_modules/react-native-video/android/src/main/java/com/brentvatne/exoplayer/CMCDConfig.kt:18: Error: Must be one of: CmcdConfiguration.MODE_REQUEST_HEADER, CmcdConfiguration.MODE_QUERY_PARAMETER [WrongConstant]
              props.mode
              ~~~~~~~~~~
  
     Explanation for issues of type "WrongConstant":
     Ensures that when parameter in a method only allows a specific set of
     constants, calls obey those rules.
  
  
  The full lint text report is located at:
    /Users/{name}/IdeaProjects/AwesomeProject/node_modules/react-native-video/android/buildOutput_a15d4dee7fc4eda61b91308cbb6a2e72/intermediates/lint_intermediate_text_report/debug/lintReportDebug/lint-results-debug.txt

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 2m 25s
202 actionable tasks: 202 executed

Reproduction Link

No response

Reproduction

  1. npx @react-native-community/cli@latest init AwesomeProject
  2. cd AwesomeProject
  3. yarn add react-native-video
  4. cd android
  5. ./gradlew build
@tmac24utm tmac24utm added the bug label Oct 23, 2024
Copy link

Thank you for your bug report. We will review it and get back to you if we need more information.

@freeboub
Copy link
Collaborator

I just provide a patch to fix this issue, let me know if it works for you

@tmac24utm
Copy link
Author

I just provide a patch to fix this issue, let me know if it works for you

Yep that worked, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants