[1] How to Solve Duplicate class org.opencv found in modules jetified-opencv-4.3.0-runtime (com.quickbirdstudios:opencv:4.3.0) and jetified-opencv-android-gradle-repo-3.3.0-runtime (com.github.davidmigloz:opencv-android-gradle-repo:3.3.0)
I'm using opencv: ^1.0.4
in flutter project
[2] and Runtime JAR files in the classpath should have the same version
warning.
flutter build apk
Building with sound null safety
w: Runtime JAR files in the classpath should have the same version. These files were found in the classpath:
C:/Users/Administrator/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.5.30/5fd47535cc85f9e24996f939c2de6583991481b0/kotlin-stdlib-jdk8-1.5.30.jar (version 1.5)
w: Some runtime JAR files in the classpath have an incompatible version. Consider removing them from the classpath
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:checkReleaseDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
> Duplicate class org.opencv.BuildConfig found in modules jetified-opencv-4.3.0-runtime (com.quickbirdstudios:opencv:4.3.0) and jetified-opencv-android-gradle-repo-3.3.0-runtime (com.github.davidmigloz:opencv-android-gradle-repo:3.3.0)
Duplicate class org.opencv.android.AsyncServiceHelper found in modules jetified-opencv-4.3.0-runtime (com.quickbirdstudios:opencv:4.3.0) and jetified-opencv-android-gradle-repo-3.3.0-runtime (com.github.davidmigloz:opencv-android-gradle-repo:3.3.0)
Duplicate class org.opencv.android.BaseLoaderCallback$7 found in modules jetified-opencv-4.3.0-runtime (com.quickbirdstudios:opencv:4.3.0) and jetified-opencv-android-gradle-repo-3.3.0-runtime (com.github.davidmigloz:opencv-android-gradle-repo:3.3.0)
Duplicate class org.opencv.android.Camera2Renderer found in modules jetified-opencv-4.3.0-runtime (com.quickbirdstudios:opencv:4.3.0) and jetified-opencv-android-gradle-repo-3.3.0-runtime (com.github.davidmigloz:opencv-android-gradle-repo:3.3.0)
....
Duplicate class org.opencv.videoio.Videoio found in modules jetified-opencv-4.3.0-runtime (com.quickbirdstudios:opencv:4.3.0) and jetified-opencv-android-gradle-repo-3.3.0-runtime (com.github.davidmigloz:opencv-android-gradle-repo:3.3.0)
Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.
* 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 29s
Running Gradle task 'assembleRelease'... 31.6s
Gradle task assembleRelease failed with exit code 1