100mslive / 100ms-react-native

React Native Live Streaming, Video Conferencing SDK & Sample App
https://www.100ms.live/
MIT License
76 stars 29 forks source link

❓ Task :100mslive_react-native-hms:minifyReleaseWithR8 FAILED #1389

Closed syedmohsin7975 closed 1 month ago

syedmohsin7975 commented 2 months ago

image

I am getting this error and my build fails. Tried adding rules in proguard-rules.pro file but this issue still persist.

Need support on what could have gone wrong.

image

image

I referred to docs, checked closed issue and also referred your sample app.

github-actions[bot] commented 2 months ago

Hello! Thank you for filing an issue.

Please include relevant logs or detailed description for faster resolutions.

We really appreciate your contribution!

syedmohsin7975 commented 2 months ago

I have already included relevant logs or detailed description. I am unable to build app getting error as mentioned above. Please help me here, tried enabling the R8 from gradle.properties but got deprecated warning. Add rules to from missing_rules.txt file.

Please add these rules to your existing keep rules in order to suppress warnings.

This is generated automatically by the Android Gradle plugin.

-dontwarn java.lang.invoke.StringConcatFactory

ygit commented 1 month ago

hey @syedmohsin7975 What's the Gradle version used in your app? Can you share your gradle-wrapper.properties file?

ygit commented 1 month ago

@syedmohsin7975 were you able to resolve this issue?

ygit commented 1 month ago

hey @syedmohsin7975 were you able to check this issue?

syedmohsin7975 commented 1 month ago

Hi @ygit

It seems that there's an issue with ProGuard minification. When disabled, everything works fine. However, enabling ProGuard causes R8 minification to fail. I'll check with the ProGuard repository to resolve this.

minhaz19 commented 3 weeks ago

@syedmohsin7975 after doing minifyEnabled false still it's showing this error. How did you fix this?

Execution failed for task ':100mslive_react-native-hms:minifyReleaseWithR8'. A failure occurred while executing com.android.build.gradle.internal.tasks.R8Task$R8Runnable Compilation failed to complete

namannangia commented 3 weeks ago

Why is this issue closed, what was the official solution to this problem?

Huzaifa-code commented 3 weeks ago

I am also facing the same issue, I have tried everything but nothing seems to work

syedmohsin7975 commented 3 weeks ago

@syedmohsin7975 after doing minifyEnabled false still it's showing this error. How did you fix this?

Execution failed for task ':100mslive_react-native-hms:minifyReleaseWithR8'. A failure occurred while executing com.android.build.gradle.internal.tasks.R8Task$R8Runnable Compilation failed to complete

There is one more place where you have to disable this, it is in the node modules of this library. Inside you will find build.gradle there also you have to disable the minifyenabled.

Ref links and lines below

https://github.com/100mslive/100ms-react-native/blob/main/packages/react-native-hms/android/build.gradle Line: 62

minhaz19 commented 3 weeks ago

@syedmohsin7975 it's working. But it's making the app significantly large. I think there has to be a better solution from the maintainer.

ygit commented 3 weeks ago

Yes @minhaz19 We'll come up with a proper fix soon