TheWidlarzGroup / react-native-video

A <Video /> component for react-native
https://docs.thewidlarzgroup.com/react-native-video/
MIT License
7.23k stars 2.9k forks source link

[BUG]: Lint Error #4253

Closed tmac24utm closed 1 month ago

tmac24utm commented 1 month ago

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

github-actions[bot] commented 1 month ago

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

freeboub commented 1 month ago

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

tmac24utm commented 1 month ago

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

Yep that worked, thanks