uxcam / react-native-ux-cam

51 stars 10 forks source link

Could not resolve all files for configuration ':react-native-ux-cam:androidApis'. (0.72.3) #100

Closed thisisadarshjais closed 1 year ago

thisisadarshjais commented 1 year ago

I updated my project to React Native 0.72.3 and react-native-ux-cam": "5.4.8"

A build operation failed. Could not resolve all files for configuration ':react-native-ux-cam:androidApis'. Could not resolve all files for configuration ':react-native-ux-cam:androidApis'. Failed to transform android.jar to match attributes {artifactType=android-mockable-jar, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime, returnDefaultValues=false}. Execution failed for MockableJarTransform: /Users/adarshjaiswal/Library/Android/sdk/platforms/android-32/android.jar. Cannot create mockable android.jar /Users/adarshjaiswal/Library/Android/sdk/platforms/android-32/android.jar

I tried installation step via 2 way but issue remains the same

  1. Via Documentation
  1. Via Example folder in github

ALSO Do let me know if the documentation is outdated and the step via example folder is correct or vice-versa

DFDIEGOH commented 1 year ago

Hey @thisisadarshjais Diego here from the UXCam team - The instructions guides that you will need to follow are listed in this link as well.

Additionally - Can you share which gradle version you are currently using as well are your compileSDK version in your app?

AdarshJais commented 1 year ago

These are the versions,

compileSdkVersion = 33 distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-all.zip

Yeah, I followed the same link for integration. And as per my understanding, The above-mentioned compileSdkVersion and graded version is the baseline for react native 0.72.3. So can't downgrade that as well.

DFDIEGOH commented 1 year ago

Thank you for sharing this information @AdarshJais We will investigate this internally, I will keep you posted on any updates we get on this regard.

DFDIEGOH commented 1 year ago

Hey @AdarshJais So we have checked this on our end and RNUXCam version 5.4.8 is working just fine with RN version 0.72.3.

Did you had a previous version of RN before upgrading your project? We would want to replicate this scenario on our end so sharing as much information as possible will definitely help us in this regard.

thisisadarshjais commented 1 year ago

Yes previously I was using "react-native-ux-cam": "5.3.1" along with react-native:"0.67.5" and then upgraded to "react-native-ux-cam": "5.4.8" along with react-native:"0.72.3" using this guide (react-native-helper)

Let me know what more details can help you, Will try my best to share with you.

AdarshJais commented 1 year ago

Please find the repo: https://github.com/AdarshJais/UXCAM_TEST;

I can see that it can easily be replicated on a fresh project.

**react-native-info**

info Fetching system and libraries information... System: OS: macOS 13.2.1 CPU: (8) arm64 Apple M2 Memory: 123.19 MB / 8.00 GB Shell: version: 5.8.1 path: /bin/zsh Binaries: Node: version: 20.5.0 path: /opt/homebrew/bin/node Yarn: version: 1.22.19 path: /usr/local/bin/yarn npm: version: 9.8.0 path: /opt/homebrew/bin/npm Watchman: version: 2023.07.24.00 path: /opt/homebrew/bin/watchman Managers: CocoaPods: Not Found SDKs: iOS SDK: Not Found Android SDK: API Levels:

image
DFDIEGOH commented 1 year ago

Thank you for sharing more information @AdarshJais and @thisisadarshjais We will investigate this internally, will keep you posted on any further updates in this regard

DFDIEGOH commented 1 year ago

Hi @AdarshJais and @thisisadarshjais We have tried this sample project on our end and everything is working as expected.

You can check the following screenshot:

  "dependencies": {
    "react": "18.2.0",
    "react-native": "0.72.3",
    "react-native-ux-cam": "^5.4.8"
  },
Screenshot 2023-08-09 at 09 35 32

Would it be possible to try the solution that is listed in here?

AdarshJais commented 1 year ago

Tried removing the complete cache multiple times, No positive result.

Is there any possibility that somehow it is related to the below context?

image
thisisadarshjais commented 1 year ago

Strange but somehow there were difference in the folder structure for the content inside Android-32 as compare to other Android API folders, restructured it same as other and it worked.