react-native-reanimated
react-native-reanimated copied to clipboard
Java Issue ?
Hello, since I pulled the code of my mate I can't launch my rn app with yarn Android (not iOS) if someone had any clues it'll be very nice cause it's just a kind of magic as i can see for now.
the same code work on my mate env but i tried on Linux (Ubuntu22.04 LTS) and MacOs (Monterey 12.3.1) on theses two devices i expect the same issue :
> Task :react-native-reanimated:compileDebugJavaWithJavac FAILED
w: Detected multiple Kotlin daemon sessions at build/kotlin/sessions
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.7.1/userguide/command_line_interface.html#sec:command_line_warnings
825 actionable tasks: 825 executed
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: /PROJECT_PATH/node_modules/expo-application/android/src/main/java/expo/modules/application/ApplicationModule.java uses or overrides 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.
Note: /PROJECT_PATH/node_modules/expo-av/android/src/main/java/expo/modules/av/player/PlayerData.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: /PROJECT_PATH/node_modules/expo-constants/android/src/main/java/expo/modules/constants/ConstantsService.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /PROJECT_PATH/node_modules/expo-camera/android/src/main/java/expo/modules/camera/CameraViewHelper.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /PROJECT_PATH/node_modules/expo-file-system/android/src/main/java/expo/modules/filesystem/FileSystemModule.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: /PROJECT_PATH/node_modules/expo-location/android/src/main/java/expo/modules/location/taskConsumers/GeofencingTaskConsumer.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: /PROJECT_PATH/node_modules/expo-secure-store/android/src/main/java/expo/modules/securestore/SecureStoreModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /PROJECT_PATH/node_modules/expo-sqlite/android/src/main/java/expo/modules/sqlite/SQLiteModule.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: /PROJECT_PATH/node_modules/expo-updates/android/src/main/java/expo/modules/updates/UpdatesConfiguration.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: /PROJECT_PATH/node_modules/@react-native-async-storage/async-storage/android/src/main/java/com/reactnativecommunity/asyncstorage/AsyncStorageModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /PROJECT_PATH/node_modules/@react-native-async-storage/async-storage/android/src/main/java/com/reactnativecommunity/asyncstorage/AsyncStoragePackage.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: /PROJECT_PATH/node_modules/@react-native-community/image-editor/android/src/main/java/com/reactnativecommunity/imageeditor/ImageEditorModule.java uses or overrides 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.
Note: /PROJECT_PATH/node_modules/@react-native-community/slider/android/src/main/java/com/reactnativecommunity/slider/ReactSliderManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /PROJECT_PATH/node_modules/@react-native-community/slider/android/src/main/java/com/reactnativecommunity/slider/ReactSliderManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: /PROJECT_PATH/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPagerManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /PROJECT_PATH/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPagerManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: /PROJECT_PATH/node_modules/react-native-device-info/android/src/main/java/com/learnium/RNDeviceInfo/RNDeviceModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: [2] Wrote GeneratedAppGlideModule with: [com.bumptech.glide.integration.okhttp3.OkHttpLibraryGlideModule, com.dylanvann.fastimage.FastImageOkHttpProgressGlideModule]
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.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: /PROJECT_PATH/node_modules/@react-native-firebase/messaging/android/src/main/java/io/invertase/firebase/messaging/ReactNativeFirebaseMessagingModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /PROJECT_PATH/node_modules/react-native-localize/android/src/main/java/com/zoontek/rnlocalize/RNLocalizeModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /PROJECT_PATH/node_modules/react-native-mail/android/src/main/java/com/chirag/RNMail/RNMailModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /PROJECT_PATH/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotificationHelper.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /PROJECT_PATH/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
/PROJECT_PATH/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/ReanimatedUIImplementation.java:13: error: cannot find symbol
ViewManagerResolver viewManagerResolver,
^
symbol: class ViewManagerResolver
location: class ReanimatedUIImplementation
/PROJECT_PATH/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/ReanimatedUIImplementation.java:11: error: recursive constructor invocation
public ReanimatedUIImplementation(
^
Note: /PROJECT_PATH/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/ReanimatedUIManager.java uses or overrides 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.
2 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.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 2m 4s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
Note: Some input files use unchecked or unsafe operations.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
sorry but i don't have any repro to provide ^^"
I already clean my Gradle cache and Gradle app, I jested it, I tried everything so : Please help !
Package versions
name | version |
---|---|
react-native | 0.63.4 |
react-native-reanimated | ^2.8.0 |
NodeJS | 16.5.0 |
Xcode | 13.3.1 |
Java | 11 |
Gradle | 6.7.1 |
expo | ^40.0.0 |
Affected platforms
- [x] Android
- [ ] iOS
- [ ] Web
Hey! 👋
It looks like you've omitted a few important sections from the issue template.
Please complete Description and Snack or minimal code example sections.
There is the android studio issue : Configuring incomplete, errors occurred! See also "/PROJECT_PATH/node_modules/react-native-reanimated/android/.cxx/cmake/debug/x86/CMakeFiles/CMakeOutput.log".
CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: FBJNI_LIB linked by target "reanimated" in directory /PROJECT_PATH/node_modules/react-native-reanimated/android FOLLY_JSON_LIB linked by target "reanimated" in directory /PROJECT_PATH/node_modules/react-native-reanimated/android GLOG_LIB linked by target "reanimated" in directory /PROJECT_PATH/node_modules/react-native-reanimated/android JSEXECUTOR_LIB linked by target "reanimated" in directory /PROJECT_PATH/node_modules/react-native-reanimated/android REACT_NATIVE_JNI_LIB linked by target "reanimated" in directory /PROJECT_PATH/node_modules/react-native-reanimated/android
Same problem with me.
Similar issue with me.
Similar issue with me.
Facing the same problem...
Same issue.
Facing the same problem..
Same error here when executing ./gradlew assembleDebug
name | version |
---|---|
react-native | 0.64.2 |
react-native-reanimated | 2.9.1 |
NodeJS | 16.15.0 |
Gradle | 6.8 |
We use RN version "0.64.2" and REA version "^2.8.0" If I use the old node modules I see this structure in re-animated >
But If do yarn install even without changing anything in package.json I see the reanimated-64.aar file not available ?
I'm able to work if I use the old node modules and that's possible until I change the package.json. Should I spend my time upgrading the RN version (which is a pain as unimodules are involved) or what else can be done here from reanimated side ?
Having the same issue
Fixed it. Updated the RN version to 0.65.1 for reanimated to work , app works fine now!
The fix for me was going into android/CMakeLists.txt and changing NODE_MODULES_DIR to my react-native path since react-native was in another node_modules.
@Pierre-EtienneM what do you mean react-native is in other node modules ?
@ratz6 My architecture is quite different than the normal architecture and I have a node_modules at the root and one in apps which contains react-native so the root with react-native-reanimated is trying to find in his own node_modules for react-native/ReactAndroid and can't find it. So first thing I'd do is open node_modules/react-native-reanimated/android/CMakeList.txt and look at NODE_MODULES_DIR and the path that is trying to look for the libs "missing"
Facing the same issue, any one found the solution?
Ok : So, first if you have android studio you can go into :
- Build > Clean Project
- Build > RebuildProject
This will change the error into this one :
Now, go into node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js and change method at L.168 : from :
callNativeSyncHook(
moduleID: number,
methodID: number,
params: any[],
onFail: ?Function,
onSucc: ?Function,
): any {
if (__DEV__) {
invariant(
global.nativeCallSyncHook,
'Calling synchronous methods on native ' +
'modules is not supported in Chrome.\n\n Consider providing alternative ' +
'methods to expose this method in debug mode, e.g. by exposing constants ' +
'ahead-of-time.',
);
}
this.processCallbacks(moduleID, methodID, params, onFail, onSucc);
return global.nativeCallSyncHook(moduleID, methodID, params);
}
to :
callNativeSyncHook(
moduleID: number,
methodID: number,
params: any[],
onFail: ?Function,
onSucc: ?Function,
): any {
const isDebuggingEnabled = (typeof atob !== 'undefined');
this.processCallbacks(moduleID, methodID, params, onFail, onSucc);
if(!isDebuggingEnabled)
{
return global.nativeCallSyncHook(moduleID, methodID, params);
}
}
It worked for me (as a temporary tips ), but you have to redo it anytime you update yours nodes modules
Facing the same issue, any one found the solution?
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?