software-mansion / react-native-reanimated

React Native's Animated library reimplemented
https://docs.swmansion.com/react-native-reanimated/
MIT License
9.05k stars 1.31k forks source link

Failed to transform react-native-reanimated-63.aar (project :react-native-reanimated) to match attributes {artifactType=android-assets} #1928

Closed RapestaNatalia closed 1 year ago

RapestaNatalia commented 3 years ago

Description

What went wrong:
Execution failed for task ':app:mergeDevDebugAssets'.
> Could not resolve all files for configuration ':app:devDebugRuntimeClasspath'.
  > Failed to transform react-native-reanimated-63.aar (project :react-native-reanimated) to match attributes {artifactType=android-assets}.
   > Execution failed for JetifyTransform: /Users/nataliarapesta/Documents/App4/mobile-app-react-native/node_modules/react-native-reanimated/android/react-native-reanimated-63.aar.
     > Check failed

I have tested a lot of ways to resolve it. For example,I installed the library manually, I cleaned cache a lot of times, I changed to a new version of react-native-reanimated 2.0.1 or 2.1.0 , unistalled and installed Java, Android Studio and SDKs but it is always the same error . It only happens with Android, iOS is ok and I see the library into node-modules.

It was installed with react-navigation, but in the project, it is not uses directly.

Expected behavior

Apps build and run successfully.

Actual behavior & steps to reproduce

App build failed.

npm run android:dev

Package versions

Affected platforms

github-actions[bot] commented 3 years ago

Issue validator

The issue is valid!

jakub-gonet commented 3 years ago

Have you tried some answers from this SO question?

Are you able to share the repro repository so we can test it locally?

RapestaNatalia commented 3 years ago

I could not share the repo because it is a company solution. Maybe if you mention some specific part of the code that are important, I could share it. Apart from that, it only happens in my local environment, so it is not easy to reproduce.

As regard your link, I have tested these options:

  1. Delete ONLY the corrupted .aar from the Gradle caches folder: rm ~/.gradle/caches/modules-2/files-2.1/path-to/some-release.aar path to= com.swmansion.reanimated or something that has the word reanimated does not appear. We tried deleting the complete .gradle folder with the same result.

  2. specifying a set of matchingFallbacks for the build types:

    buildTypes {
        debug {
            signingConfig signingConfigs.debug
            matchingFallbacks = ['debug']
        }
        release {
            // Caution! In production, you need to generate your own keystore file.
            // see https://reactnative.dev/docs/signed-apk-android.
            minifyEnabled enableProguardInReleaseBuilds
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
        }
    }
compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

4.

These 4 options do not work. Could you explain me if there is a side effect into the app if I delete it from package.json or do something like that? For now, I don’t see one. We installed it together with react-nativation.


module.exports = {
  assets: ['./src/assets/fonts/'],
  dependencies: {
    'react-native-reanimated': {
      platforms: {
        android: null,
      },
    },
  },
}

Thanks for your answer!

RapestaNatalia commented 3 years ago

Hi @jakub-gonet. Could you see my question?Another idea to avoid this problem?

mamta-deswal commented 3 years ago

any update on this?

ZiggStardust commented 3 years ago

running into the same issue :(

mamta-deswal commented 3 years ago

@ZiggStardust which version of react-native you are using?

ZiggStardust commented 3 years ago

@mamta-deswal hey - 0.61.5

mamta-deswal commented 3 years ago

with react native version 0.61 please use these version of react-navigation dependency:- "react-native-gesture-handler": "1.4.0", "react-native-reanimated": "1.13.1" "react-native-screens": "2.14.0" Delete node module and update your package.json and npm install. you will good to go.

ZiggStardust commented 3 years ago

@mamta-deswal still having issues any help would be much appreciated

"dependencies": { "@react-native-community/async-storage": "^1.8.1", "@react-native-community/masked-view": "^0.1.6", "@react-navigation/native": "^5.9.4", "@react-navigation/stack": "^5.14.5", "axios": "^0.19.2", "react": "16.9.0", "react-native": "0.61.5", "react-native-firebase": "^5.6.0", "react-native-gesture-handler": "1.4.0", "react-native-nfc-manager": "^2.1.1", "react-native-push-notification": "^3.1.9", "react-native-reanimated": "1.13.1", "react-native-safe-area-context": "^0.7.3", "react-native-screens": "2.14.0", "react-native-tab-view": "^2.13.0" },

`> Task :react-native-reanimated:androidJavadoc FAILED

FAILURE: Build failed with an exception.

mamta-deswal commented 3 years ago

allprojects { tasks.withType(Javadoc).all { enabled = false }

On Mon, May 10, 2021, 8:02 PM ZiggStardust @.***> wrote:

@mamta-deswal https://github.com/mamta-deswal still having issues any help would be much appreciated

"dependencies": { @./async-storage": "^1.8.1", @./masked-view": "^0.1.6", @./native": "^5.9.4", @./stack": "^5.14.5", "axios": "^0.19.2", "react": "16.9.0", "react-native": "0.61.5", "react-native-firebase": "^5.6.0", "react-native-gesture-handler": "1.4.0", "react-native-nfc-manager": "^2.1.1", "react-native-push-notification": "^3.1.9", "react-native-reanimated": "1.13.1", "react-native-safe-area-context": "^0.7.3", "react-native-screens": "2.14.0", "react-native-tab-view": "^2.13.0" },

`> Task :react-native-reanimated:androidJavadoc FAILED

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':react-native-reanimated:androidJavadoc'.

Javadoc generation failed. Generated Javadoc options file (useful for troubleshooting): '/Users/tom/workspace/visa/sales-app/node_modules/react-native-reanimated/android/build/tmp/androidJavadoc/javadoc.options'`

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/software-mansion/react-native-reanimated/issues/1928#issuecomment-836773049, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOFDYHYIRZ4OQHTK57OY6BDTM7U6VANCNFSM42YMIFWA .

ZiggStardust commented 3 years ago

@mamta-deswal that works :) thanks

emadhajjar commented 3 years ago

I am having the same issue after upgrade react-native to ^0.65.0-rc.2

PrinceUBS commented 3 years ago

I am having the same issue after upgrade react-native to ^0.65.0-rc.2

same issue (in react-native 0.65.0-rc.2), any fix?

piaskowyk commented 3 years ago

Unfortunately, Reanimated currently doesn't support react-native 0.65.*. I'm working on this now. It should be available soon.

sdumjahn commented 3 years ago

I run into the same problem as @RapestaNatalia. I can't build the android app.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:javaPreCompileDebug'.
> Could not resolve all files for configuration ':app:debugCompileClasspath'.
   > Failed to transform react-native-reanimated-63.aar (project :react-native-reanimated) to match attributes {artifactType=android-classes, org.gradle.usage=java-api}.
      > Execution failed for JetifyTransform: path-to-project/node_modules/react-native-reanimated/android/react-native-reanimated-63.aar.
         > Check failed.

I'm using RN 0.63.4

alz10 commented 3 years ago

Not working as well in RN 0.65.0-rc.4. I need to target API level 30 (Android 11) for my apps.

Screen Shot 2021-08-17 at 9 09 37 PM
Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Failed to transform react-native-reanimated-65-jsc.aar 
(project :react-native-reanimated) to match attributes {artifactType=android-aar-metadata}.
RichardLindhout commented 3 years ago

I have the same problem as @alz10

Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Failed to transform react-native-reanimated-65-hermes.aar (project :react-native-reanimated) to match attributes {artifactType=android-aar-metadata}.
      > Execution failed for JetifyTransform: /...____.../node_modules/react-native-reanimated/android/react-native-reanimated-65-hermes.aar.
         > Transform's input file does not exist: /...____.../node_modules/react-native-reanimated/android/react-native-reanimated-65-hermes.aar. (See https://issuetracker.google.com/issues/158753935)
RichardLindhout commented 3 years ago

What I did for now was going the node_modules/react-native-reanimated/android directory and run the following

cp react-native-reanimated-64-hermes.aar react-native-reanimated-65-hermes.aar
Konntroll commented 3 years ago

Unfortunately, Reanimated currently doesn't support react-native 0.65.*. I'm working on this now. It should be available soon.

Hey! Any update on this, @piaskowyk?

RN 0.65 stable got released the other day and my organisation is looking into upgrading our apps to this newer version. After some trial/error I got the apps to build and run on iOS, however, @RichardLindhout's solution only gets me to where the Android app is building and uploading to the sim but then quietly stops with Logcat spewing out A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 25423 (create_react_co).

I'm assuming this is still the cause of the problem, so it would be great to know if we should expect 0.65 support from RN Reanimated in the coming days/weeks or just shelve the upgrade for the time being. Any news would be appreciated!

alz10 commented 3 years ago

For those who are looking for a temporary fix just install this version npm i react-native-reanimated@2.3.0-alpha.2 --save --force

Not working as well in RN 0.65.0-rc.4. I need to target API level 30 (Android 11) for my apps.

also v0.65.1 latest release is now available just incase you're still using a release candidate

mohamadnavabi commented 3 years ago

try this:

npm i react-native-reanimated@^1.13.2

jkadamczyk commented 2 years ago

Hey! I am very sorry you are experiencing issues with Reanimated 2. I have 2 questions to all of you. Do you still experience the issue mentioned here? Do any of you have a repro that we can take a look at to try fix the issue?

@alz10 @RichardLindhout @sdumjahn @PrinceUBS @aleppos @ZiggStardust @mamta-deswal @RapestaNatalia

RichardLindhout commented 2 years ago

No I'm not experiencing this anymore!

chukwuma-azubuike commented 2 years ago

Issue still persists

Saileek-bidchat commented 1 year ago

Getting same issue on RN 0.68.0 for "react-native-reanimated": "^2.3.0-alpha.2"

AzeemSarwar1 commented 1 year ago

yarn add react-native-reanimated@2.13.0 work for me

Latropos commented 1 year ago

I'm closing this issue since it was only present for old versions of Reanimated 2. Upgrading reanimated should fix the issue, please use Reanimated 3.