cjam / react-native-spotify-remote

React Native wrapper around the Spotify Remote SDK
MIT License
258 stars 101 forks source link

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

Open TomFevrier opened 4 years ago

TomFevrier commented 4 years ago

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!

cjam commented 4 years ago

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.

rohit-ganapathy commented 4 years ago

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

Jsepr commented 3 years ago

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.

diegoareval commented 3 years ago

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

cjam commented 3 years ago

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 commented 3 years ago

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

diegoareval commented 3 years ago

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

TomFevrier commented 3 years ago

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