-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
error: cannot find symbol ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager()) #37329
Comments
Do you have the |
okay I got this issue resolved after |
I am facing similar issue when trying to deploy a staging build with fastlane to Firebase App Distribution. Below is the result of
Below is the content of
|
Is it because you now have a |
I've tried duplicating the file from
|
The folder needs to be inside |
Oh thank you so much! It works now and I think I've got a better understanding. |
It worked for me, thank you very much! |
For me the problem was that I had forgotten to add
|
in my build.gradle
and add staging/java/com/{appName}/ReactNativeFlipper.java(from debug/java/com/{appName}/ReactNativeFlipper.java) tips: in buildType debug is sucess can I solve this problem? |
New Version
0.71.7
Old Version
0.67.5
Build Target(s)
android emulator
Output of
react-native info
System:
OS: macOS 13.3.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 212.56 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 16.19.1 - /usr/local/opt/node@16/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 8.19.3 - /usr/local/opt/node@16/bin/npm
Watchman: 2023.04.17.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.12.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK:
API Levels: 28, 29, 30, 31, 32, 33
Build Tools: 28.0.3, 29.0.2, 30.0.2, 30.0.3, 31.0.0, 32.0.0, 32.1.0, 33.0.0, 34.0.0
System Images: android-30 | Google Play Intel x86 Atom, android-31 | Google APIs Intel x86 Atom_64, android-31 | Google Play Intel x86 Atom_64
Android NDK: Not Found
IDEs:
Android Studio: 2021.1 AI-211.7628.21.2111.8309675
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: 11.0.11 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: ^0.71.7 => 0.71.7
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Issue and Reproduction Steps
yarn to install all dependencies
set environment variables as needed for android
export ANDROID_SDK_ROOT=
/Library/Android/sdk/Library/Android/sdkexport ANDROID_HOME=
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-11.0.14.jdk/Contents/Home
export JAVA_HOME="/Applications/Android Studio.app/Contents/jre/Contents/Home"
export PATH=$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/emulator:$ANDROID_HOME/platform-tools:$PATH
launch the android emulator
cd android
yarn android
build error:
BUILD FAILED in 1m 5s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
/xxxx/android/app/src/main/java/com/usermanagement/testapp/MainApplication.java:61: error: cannot find symbol
ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
^
symbol: variable ReactNativeFlipper
location: class MainApplication
1 error
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
Execution failed for task ':app:compileDebugJavaWithJavac'.
2: Task failed with an exception.
What went wrong:
java.lang.StackOverflowError (no error message)
Try:
BUILD FAILED in 1m 5s
info Run CLI with --verbose flag for more details.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
The text was updated successfully, but these errors were encountered: