TheWidlarzGroup / react-native-video

A <Video /> component for react-native
https://thewidlarzgroup.github.io/react-native-video/
MIT License
7.19k stars 2.9k forks source link

[BUG]: Execution failed for task ':app:mergeExtDexTvDebug' after updating repo to 6.4+ #4035

Open maciejsiiminski opened 3 months ago

maciejsiiminski commented 3 months ago

Version

6.4.0+

What platforms are you having the problem on?

Android TV

System Version

10

On what device are you experiencing the issue?

Real device

Architecture

Old architecture

What happened?

The project build fails after updating the repo to the latest version (6.4.3). I also tried 6.4.0 with the same outcome so I assumed that it is an issue with versions 6.4+. I tried changing the Kotlin version to 1.9.0 because some logs before the error pointed out incompatible versions but it also didn't fix this issue.

`ERROR:D8: com.android.tools.r8.kotlin.H

FAILURE: Build failed with an exception.

What went wrong: Execution failed for task ':app:mergeExtDexTvDebug'.

Could not resolve all files for configuration ':app:tvDebugRuntimeClasspath'. Failed to transform okio-jvm-3.6.0.jar (com.squareup.okio:okio-jvm:3.6.0) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring= true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=true, dexing-min-sdk=21, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=releas e, org.gradle.usage=java-runtime, org.jetbrains.kotlin.platform.type=jvm}. Execution failed for DexingWithClasspathTransform: C:\Users\macie.gradle\caches\transforms-3\7a5b0e04df4def315618bf1f7df31fc6\transformed\jetified-okio-jvm-3.6.0.jar.
Error while dexing.

Reproduction

repository link

Reproduction

In my project just updating the repository and running the project causes the issue.

moskalakamil commented 3 months ago

Hi @maciejsiiminski, thanks for reporting the issue! Did you tried to run your project via Android Studio? What happens then?

douzal34 commented 2 months ago

Hi @maciejsiiminski and @moskalakamil,

I've encountered the same issue, especially when running this command: react-native run-android.

When I run ./gradlew bundleRelease && react-native run-android --variant=release, it works, but I can't rely on this because I need to develop in debug mode.

The issue does not appear in version 6.3.0, but it starts appearing from version 6.4.0 on my side as well.

Note that I have tried setting multiDexEnabled to true and preDexLibraries to false in the defaultConfig of the module's build.gradle, but the issue persists.

Screenshot 2024-08-20 at 10 29 27
freeboub commented 2 months ago

Is it possible to get a sample project to understand / reproduce the issue ?

douzal34 commented 2 months ago

Is it possible to get a sample project to understand / reproduce the issue ?

I can't share an example cause my repository is private. On the other hand, i can share to you my build.gradle from my project and my module, maybe it can help.

freeboub commented 1 month ago

seems very similar to: https://github.com/TheWidlarzGroup/react-native-video/issues/4138 Do you use an old react native version ?

douzal34 commented 1 month ago

My react-native version is 0.72.12 @freeboub

maciejsiiminski commented 1 month ago

Sorry, I forgot that I opened this issue and realized it when I tried updating to the newest version again. My react-native version is 0.72.6. Unfortunately, I have nothing more to add and my repository is also private as I am just an employee.

freeboub commented 1 month ago

@douzal34 @maciejsiiminski If you can create a very small sample to reproduce the issue it would be useful! I don't know how to investigate the issue ...

Softkeydel commented 1 month ago

any solution guys??

github-actions[bot] commented 2 weeks ago

This issue is stale because it has been open for 30 days with no activity. If there won't be any activity in the next 14 days, this issue will be closed automatically.

sonodima commented 1 week ago

I'm having this issue too on React Native 0.72.11

moskalakamil commented 1 week ago

@sonodima could you please create a small sample repo with reproduction?

sonodima commented 1 week ago

@sonodima could you please create a small sample repo with reproduction?

I think I actually just found out how to fix it. What fixed it for me was to bump minSdkVersion from 21 to 24. For the react-native-video update (I was on 6.2.0) I also needed to update kotlinVersion from 1.7.22 to 1.8.0.

douzal34 commented 1 week ago

I'm confirming what's @sonodima said, if I set minSdkVersion from 21 to 24, it's working.