Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execution failed for task ':react-native-reanimated:compileDebugJavaWithJavac'. #3743

Closed
fogg4444 opened this issue Nov 4, 2022 · 65 comments
Labels
Missing info The user didn't precise the problem enough Missing repro This issue need minimum repro scenario Needs review Issue is ready to be reviewed by a maintainer Platform: Android This issue is specific to Android

Comments

@fogg4444
Copy link

fogg4444 commented Nov 4, 2022

Description

> Task :react-native-reanimated:compileDebugJavaWithJavac FAILED
aapt2 W 11-04 14:19:29 66234 2702028 LoadedArsc.cpp:682] Unknown chunk type '200'.


Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.2/userguide/command_line_interface.html#sec:command_line_warnings
203 actionable tasks: 203 executed
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Note: **********/node_modules/@bugsnag/react-native/android/src/main/java/com/bugsnag/android/ReactNativeCompat.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: *********/node_modules/@react-native-community/slider/android/src/oldarch/java/com/reactnativecommunity/slider/ReactSliderManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.




node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/ReanimatedUIManager.java:15: error: cannot find symbol
class ReaUiImplementationProvider extends UIImplementationProvider {
                                          ^
  symbol: class UIImplementationProvider
********/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/ReanimatedUIManager.java:17: error: method does not override or implement a method from a supertype
  @Override
  ^
********/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/ReanimatedUIManager.java:38: error: no suitable constructor found for UIManagerModule(ReactApplicationContext,List<ViewManager>,ReaUiImplementationProvider,int)
    super(
    ^
    constructor UIManagerModule.UIManagerModule(ReactApplicationContext,ViewManagerResolver,int) is not applicable
      (actual and formal argument lists differ in length)
    constructor UIManagerModule.UIManagerModule(ReactApplicationContext,List<ViewManager>,int) is not applicable
      (actual and formal argument lists differ in length)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
3 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-reanimated:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

Steps to reproduce

I've been uninstalling, re-installing, clearing caches and resetting everything I can at every stage. Can't seem to resolve this issue

Mac M1, Android Studio

Snack or a link to a repository

Reanimated version

2.12.0 (but also occurred in ^2.11.0)

React Native version

0.65.0

Platforms

Android

JavaScript runtime

No response

Workflow

React Native (without Expo)

Architecture

Paper (Old Architecture)

Build type

Debug mode

Device

Android emulator

Device model

No response

Acknowledgements

Yes

@fogg4444 fogg4444 added the Needs review Issue is ready to be reviewed by a maintainer label Nov 4, 2022
@github-actions github-actions bot added the Platform: Android This issue is specific to Android label Nov 4, 2022
@github-actions
Copy link

github-actions bot commented Nov 4, 2022

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

@github-actions github-actions bot added Missing repro This issue need minimum repro scenario Missing info The user didn't precise the problem enough labels Nov 4, 2022
@github-actions
Copy link

github-actions bot commented Nov 4, 2022

Hey! 👋

It looks like you've omitted a few important sections from the issue template.

Please complete Snack or a link to a repository section.

@fogg4444
Copy link
Author

fogg4444 commented Nov 4, 2022

I've been following this issue, but we're not making any progress there:

@fogg4444 fogg4444 changed the title Execution failed for task ':react-native-reanimated:compileDebugJavaWithJavac'. - ReanimatedUIManager.java:15: error: cannot find symbol class ReaUiImplementationProvider extends UIImplementationProvider Execution failed for task ':react-native-reanimated:compileDebugJavaWithJavac'. Nov 4, 2022
@smadan
Copy link

smadan commented Nov 4, 2022

I'm also seeing something similar. I'm on RN v0.63.3, react-native-reanimated v2.6.0. It seems to have appeared out of nowhere. My app was compiling correctly literally 2 days ago. Now, with absolutely no change on my end, it seems to be failing here:

/Users/sameermadan/gezunt/gezuntpatient/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/ReanimatedUIManager.java:15: error: cannot find symbol
class ReaUiImplementationProvider extends UIImplementationProvider {
                                          ^
  symbol: class UIImplementationProvider
/Users/sameermadan/gezunt/gezuntpatient/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/ReanimatedUIImplementation.java:13: error: cannot find symbol
      UIManagerModule.ViewManagerResolver viewManagerResolver,
                     ^
  symbol:   class ViewManagerResolver
  location: class UIManagerModule
/Users/sameermadan/gezunt/gezuntpatient/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/ReanimatedUIManager.java:17: error: method does not override or implement a method from a supertype
  @Override
  ^
/Users/sameermadan/gezunt/gezuntpatient/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/ReanimatedUIManager.java:38: error: no suitable constructor found for UIManagerModule(ReactApplicationContext,List<ViewManager>,ReaUiImplementationProvider,int)
    super(
    ^
    constructor UIManagerModule.UIManagerModule(ReactApplicationContext,ViewManagerResolver,int) is not applicable
      (actual and formal argument lists differ in length)
    constructor UIManagerModule.UIManagerModule(ReactApplicationContext,List<ViewManager>,int) is not applicable
      (actual and formal argument lists differ in length)
/Users/sameermadan/gezunt/gezuntpatient/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/ReanimatedUIImplementation.java:11: error: recursive constructor invocation
  public ReanimatedUIImplementation(
         ^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
5 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-reanimated:compileDebugJavaWithJavac'.

@mishkeTz
Copy link

mishkeTz commented Nov 4, 2022

I am having the same issue. Happened today for the first time, before the build worked fine (yesterday everything was fine).

RN: 0.63.4
REA: 2.8.0

@prerakd
Copy link

prerakd commented Nov 4, 2022

I am also facing the same issue. Started happening from today only..
react-native: 0.69.6
react-native-reanimated: 2.10

error: cannot find symbol class ReaUiImplementationProvider extends UIImplementationProvider { ^ symbol: class UIImplementationProvider

error: no suitable constructor found for UIManagerModule(ReactApplicationContext,List<ViewManager>,ReaUiImplementationProvider,int) super( ^ constructor UIManagerModule.UIManagerModule(ReactApplicationContext,ViewManagerResolver,int) is not applicable (actual and formal argument lists differ in length) constructor UIManagerModule.UIManagerModule(ReactApplicationContext,List<ViewManager>,int) is not applicable (actual and formal argument lists differ in length)

@bkasten-rbi
Copy link

us also...

@dingsoundclub
Copy link

Yes, I'm also getting same issue from just 1 hour ago

@fogg4444
Copy link
Author

fogg4444 commented Nov 4, 2022

So, this issue that I referenced, could be a duplicate, but I guess I just wanted to get the discussion fired up again. We can close this and move discussion to the original issue if it's truly a duplicate:

@fogg4444
Copy link
Author

fogg4444 commented Nov 4, 2022

I'm glad I'm not alone lol

@bkasten-rbi
Copy link

related possibly: facebook/react-native#35204

@vabruzzese
Copy link

Seeing this as well on 2.10.0

> Task :react-native-reanimated:compileReleaseJavaWithJavac FAILED
/Users/vagrant/git/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/ReanimatedUIManager.java:15: [REDACTED]: cannot find symbol
class ReaUiImplementationProvider extends UIImplementationProvider {
                                          ^

The issue started happening today without any modifications to our application

@mishkeTz
Copy link

mishkeTz commented Nov 4, 2022

I believe @bkasten-rbi has right, it seems to be a related issue.

@prerakd
Copy link

prerakd commented Nov 4, 2022

@mishkeTz yes. seems relatable to me too.

@smadan
Copy link

smadan commented Nov 4, 2022

The proposed workaround on facebook/react-native#35204 is to add something like this implementation 'com.facebook.react:react-native:0.68.2!!' in your app's Gradle file. That does not fix the issue for me and I'm still seeing the same errors (I'm on RN v0.63.3). Does that work for anyone else?

@mishkeTz
Copy link

mishkeTz commented Nov 4, 2022

Can confirm that this works: facebook/react-native#35204 (comment)

android/build.gradle

allprojects {

    repositories { /* ... */ }

    configurations.all {
        resolutionStrategy {
            force 'com.facebook.react:react-native:0.63.4'
        }
    }
}

@eldanielsoares
Copy link

eldanielsoares commented Nov 5, 2022

Here this same problem begin happen today without i changed my code, yesterday it was all working, whats happening?

@iit2008047
Copy link

Any update ?

@eldanielsoares
Copy link

Bug solution with problem explication here :
facebook/react-native#35204

@IrvingGuerra
Copy link

Same here. The code is the same

@Kuldeepkumhar-fs
Copy link

Im also facing the same issue...can anyone let me know what is the solution for it....

@kitchanismo
Copy link

use yarn instead.

yarn install
npm run android

somehow its not working with npm anymore

@mohsinnaqvi606
Copy link

same issue, yesterday app was working fine but now not unable to run project. ANY SOLUTION??

@fayistuh
Copy link

fayistuh commented Nov 5, 2022

same problem

@ibrar-joyn
Copy link

ibrar-joyn commented Nov 6, 2022

i have also faced same issue but installing react native reaimated package fixed it.
https://www.npmjs.com/package/react-native-reanimated

@Yousafzubair991
Copy link

facebook/react-native#35204 (comment)

Upgrading react-native-reanimated from "2.9.1" to "2.12.0" Worked for me!

npm i react-native-reanimated@2.12.0

@iamvucms
Copy link

iamvucms commented Nov 6, 2022

Just upgraded to latest reanimated version then It works.

@wanderson-ra
Copy link

I solved this issue simply add a version of react-native on my resolutions from package.json. In my case 0.69.1.

 "resolutions": {
    "react-native": "0.69.1"
  },

@bilmapay
Copy link

bilmapay commented Nov 6, 2022

Can confirm that this works: facebook/react-native#35204 (comment)

android/build.gradle

allprojects {

    repositories { /* ... */ }

    configurations.all {
        resolutionStrategy {
            force 'com.facebook.react:react-native:0.63.4'
        }
    }
}

This worked for me but when adding the code make sure the react native version installed match the version for this line: force 'com.facebook.react:react-native:0.63.4'

@subir-pats
Copy link

SOLVED IT...!!!

followed solution suggested by @mishkeTz

Also updated react-native-reanimated from "2.10.0" to "2.12.0"

Can confirm that this works: facebook/react-native#35204 (comment)
android/build.gradle

allprojects {

    repositories { /* ... */ }

    configurations.all {
        resolutionStrategy {
            force 'com.facebook.react:react-native:0.63.4'
        }
    }
}

This worked for me

@Naman-Garaaz
Copy link

Naman-Garaaz commented Nov 7, 2022

Guys facing same issue but the above solution worked for me in "build.gradle" file project level.
allprojects {

repositories { /* ... */ }

configurations.all {
    resolutionStrategy {
        force 'com.facebook.react:react-native:0.63.4'
    }
}

}

@amitmehtacode
Copy link

amitmehtacode commented Nov 7, 2022

I have solved this by writing following code in android/build.gradle

def REACT_NATIVE_VERSION = new File(['node', '--print', "JSON.parse(require('fs').readFileSync(require.resolve('react-native/package.json'), 'utf-8')).version"].execute(null, rootDir).text.trim())

 
allprojects {
    configurations.all {
        resolutionStrategy {
            force "com.facebook.react:react-native:" + REACT_NATIVE_VERSION
        }
    }


     repositories {
         mavenLocal()
         maven {

@vladimirevstratov
Copy link

vladimirevstratov commented Nov 7, 2022

Update react-native-reanimated to 2.12.0 helped.

@shreyash0011
Copy link

thank you, its help me to solved this issue..

@elmabdelaiz
Copy link

SOLVED IT...!!!

followed solution suggested by @mishkeTz

Also updated react-native-reanimated from "2.10.0" to "2.12.0"

Can confirm that this works: facebook/react-native#35204 (comment)
android/build.gradle

allprojects {

    repositories { /* ... */ }

    configurations.all {
        resolutionStrategy {
            force 'com.facebook.react:react-native:0.63.4'
        }
    }
}

It worked for me but instead of 0.63.4 I used the 0.70.1 which is the one I have on my project

@remcoabalain
Copy link

Guys, prefer using that method in that PR to avoid using specific versions in your build.gradle

This works for me, thanks.

@enagorny
Copy link

enagorny commented Nov 7, 2022

There react-native hotfix versions now which doesn't require to modify android/build.gradle:
facebook/react-native#35210

@keshavroot203
Copy link

simple and effective solution - reinstall the package which stops the build
example-Execution failed for task ':react-native-reanimated:compileDebugJavaWithJavac'.
yarn add react-native-reanimated

@muhammad-awais-eng
Copy link

 **hey  i just  fixed  this   issue  in your  android /   build.gradle   add   these  line  to** 

all projects {
repositories {

exclusiveContent {
filter {
includeGroup "com.facebook.react"
}
forRepository {
maven {
url "$rootDir/../node_modules/react-native/android"
}
}
}

....
}

@PABourdais
Copy link

I have fixed that by upgrading react-native from 0.69.4 to 0.69.7

Have a look on this issue to know which version of react-native you need to upgrade

@wellespaiva-dev
Copy link

Consegui resolver utilizando a sugestão @mohsinnaqvi606, atualizando a versão do react-native-reanimated de "2.10.0" para "2.12.0".

@hans-PixelMonkey
Copy link

I have solved this by writing following code in android/build.gradle

def REACT_NATIVE_VERSION = new File(['node', '--print', "JSON.parse(require('fs').readFileSync(require.resolve('react-native/package.json'), 'utf-8')).version"].execute(null, rootDir).text.trim())

 
allprojects {
    configurations.all {
        resolutionStrategy {
            force "com.facebook.react:react-native:" + REACT_NATIVE_VERSION
        }
    }


     repositories {
         mavenLocal()
         maven {

This works for me!

@romannmk
Copy link

romannmk commented Nov 7, 2022

Reinstall react-native-reanimated.
"react-native-reanimated": "^2.12.0" - solved for me

@AshlandWest
Copy link

Installing Facebook's hot-fix solved the issue for me.
They released an update to all affected versions.
Facebook's Update

@avinash6982
Copy link

Thank

Installing Facebook's hot-fix solved the issue for me.
They released an update to all affected versions.
Facebook's Update

YESS.. It works.. thanks Team!

@jabraham0301
Copy link

SOLVED IT...!!!

followed solution suggested by @mishkeTz
Also updated react-native-reanimated from "2.10.0" to "2.12.0"

Can confirm that this works: facebook/react-native#35204 (comment)
android/build.gradle

allprojects {

    repositories { /* ... */ }

    configurations.all {
        resolutionStrategy {
            force 'com.facebook.react:react-native:0.63.4'
        }
    }
}

It worked for me but instead of 0.63.4 I used the 0.70.1 which is the one I have on my project

It worked for me, using 0.70.0 my project's version

@Bhaskar-Ebslon-Infotech
Copy link

upgrading react-native-reanimated to v2.12.0 worked for me.

react-native:0.69.4
previous react-native-reanimated version: 2.10.0
current react-native-reanimated version: 2.12.0

@Vashiru
Copy link

Vashiru commented Nov 8, 2022

Installing Facebook's hot-fix solved the issue for me. They released an update to all affected versions. Facebook's Update

I had to update react-native to use this patch, then update react-native-reanimatied from 2.2.2 to 2.12.0 and lastly I had to run npm start -- --reset-cache rathern than the yarn start I normally use or I'd get global.__reanimatedWorkletInit is not a function.

I tried 2.2.4 and some other versions as well, they ran into issues like Exception Hostfunction and some other stuff. So if you're running into that, try 2.12.0 and resetting the cache.

@fabriciosiqueira
Copy link

In my case, I deleted the node modules, in the package.json I deleted this "react-native-reanimated" and then I did this
1 yarn
2 yarn add react-native-reanimated
3 in /android >graldew clean
4 try to run your app > npx react-native run-android
theses steps above solved my problem

@tomekzaw
Copy link
Member

tomekzaw commented Nov 8, 2022

Hey everyone! I'm locking this thread since technically it's not a bug with Reanimated, but with React Native (after the release of 0.71.0-rc.0 which affects all previous stable releases).

ℹ️ See facebook/react-native#35210 for more details, hot-fixes and workarounds.

Alternatively, you can upgrade to react-native-reanimated@2.12.0 which seems to fix the problem.

@tomekzaw tomekzaw closed this as completed Nov 8, 2022
@software-mansion software-mansion locked as spam and limited conversation to collaborators Nov 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Missing info The user didn't precise the problem enough Missing repro This issue need minimum repro scenario Needs review Issue is ready to be reviewed by a maintainer Platform: Android This issue is specific to Android
Projects
None yet
Development

No branches or pull requests