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]: Execution failed for task ':app:mergeExtDexTvDebug' after updating repo to 6.4+ #4035

Open
maciejsiiminski opened this issue Jul 25, 2024 · 14 comments
Labels

Comments

@maciejsiiminski
Copy link

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
Copy link
Member

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

@douzal34
Copy link

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
Copy link
Collaborator

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

@douzal34
Copy link

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
Copy link
Collaborator

freeboub commented Sep 5, 2024

seems very similar to: #4138
Do you use an old react native version ?

@douzal34
Copy link

douzal34 commented Sep 5, 2024

My react-native version is 0.72.12 @freeboub

@maciejsiiminski
Copy link
Author

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
Copy link
Collaborator

freeboub commented Sep 10, 2024

@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
Copy link

any solution guys??

Copy link

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.

@github-actions github-actions bot added the stale Closed due to inactivity or lack or resources label Oct 15, 2024
@sonodima
Copy link

I'm having this issue too on React Native 0.72.11

@moskalakamil
Copy link
Member

moskalakamil commented Oct 17, 2024

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

@sonodima
Copy link

@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.

@github-actions github-actions bot removed the stale Closed due to inactivity or lack or resources label Oct 18, 2024
@douzal34
Copy link

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

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

6 participants