react-native-spotify-remote icon indicating copy to clipboard operation
react-native-spotify-remote copied to clipboard

Execution failed for task ':react-native-spotify-remote:mergeDebugJavaResource' when running assembleDebug

Open TomFevrier opened this issue 5 years ago • 8 comments
trafficstars

Hello there!

Whenever I try to generate an APK version of my app (using ./gradlew assembleDebug), I get the following error:

> Task :react-native-spotify-remote:mergeDebugJavaResource FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-spotify-remote:mergeDebugJavaResource'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > More than one file was found with OS independent path 'classes.jar'

Any idea of what could go wrong? Thank you very much!

TomFevrier avatar Jul 07 '20 10:07 TomFevrier

hmm, truth be told I haven't gotten to trying to generate an APK using this library yet. There's likely something that needs to be tweaked. I'll have to see if this is happening with the example app.

cjam avatar Jul 09 '20 12:07 cjam

if it helps.. I did generate an apk using react-native run-android --variant=release and didn't face an issue

rohit-ganapathy avatar Jul 13 '20 18:07 rohit-ganapathy

Has anyone managed to build with assembleDebug or assembleRelease? I'm having this exact problem and I'm not sure what to do since I can build it successfully for ios. I need to build it using assembleRelease to be able to publish it to play store.

Edit: Managed to build it using react-native run-android --variant=release and then generating an .aab using ./gradlew bundleRelease which I was able to upload.

Jsepr avatar Dec 05 '20 14:12 Jsepr

Hi. I have a similar issue, I'm wondering if anyone managed to solve this? Here's a link to my issue: https://github.com/cjam/react-native-spotify-remote/issues/90

diegoareval avatar Jan 08 '21 19:01 diegoareval

I was able to build and publish a release of an android app with this library to the play store. I wonder what the differences are. The project I built was using react native 0.61.5. And I used the Generate Signed Bundle / APK... from the build menu in android studio.

cjam avatar Jan 08 '21 23:01 cjam

@TomFevrier could you try the fix suggested here https://github.com/cjam/react-native-spotify-remote/issues/90#issuecomment-819091409

cjam avatar Apr 16 '21 13:04 cjam

The error only happen when I use fastlane to deploy otherwise the build run really great. And my app is really big and use so many functions of the library. In the future would be really nice to support fastlane. The problem is the aab file located in the Android platform of the library, but this error should not be so important, but would be really nice to fix it

diegoareval avatar Apr 16 '21 13:04 diegoareval

@TomFevrier could you try the fix suggested here #90 (comment)

I have given up on this project for a long time now. Feel free to close the issue.

TomFevrier avatar Apr 16 '21 13:04 TomFevrier