You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to build my react-native app running react-native run-android --variant debugtwo, "debugtwo" being a variant in my build.gradle.
It should be no different from the release variant, except from react enviroment variables, which are hardcoded for debug purposes and a different app id from the release variant.
I get this error
/{MY_ROOT_DIRECTORY}/android/app/src/debugtwo/java/it/example/app/ReactNativeFlipper.java:26: error: cannot find symbol
import tech.bam.rnperformance.flipper.RNPerfMonitorPlugin
The current setup
ReactNativeFlipper.java in the "debugtwo" directory structure
I've copied the exact same structure from the regular "debug" variant, so the class file ReactNativeFlipper.java is in the correct position: android/app/src/debugtwo/java/it/example/app/ReactNativeFlipper.java
I get no errors with flipper iself or flipper plugins like CrashReporterPlugin, since i put to have flipper available in a release like build
Something with the autolinking of the dependencies seems wrong, so i also tried manually linking like this
in android/settings.gradle
include ':react-native-flipper-performance-plugin'
project(':react-native-flipper-performance-plugin').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-flipper-performance-plugin/android')
and in android/app/build.gradle:
implementation project(':react-native-flipper-performance-plugin') // add this line
I have also checked the node version used in android studio and the default on my machine with nvm current and they match (16.15.0)
The text was updated successfully, but these errors were encountered:
This is most definitely because the plugin code is only available in the debug build type (all the code is in the debug folder)
This plugin is a bit particular because I had added an actual React Native native module to make sure autolinking would work (quite ironic since it's not working in your case 😥). So to make sure the Flipper plugin code would not be added in production, that's why it's only present for the debug build type.
A quick fix could be to have a postinstall script that just does something like cp -R node_modules/react-native-flipper-performance-plugin/android/src/debug node_modules/react-native-flipper-performance-plugin/android/src/debugtwo/
I'm curious though, what's the reason for creating a debugtwo build type which is like release? 🤔
include ':flipper-plugin-rn-performance-android'
project(':flipper-plugin-rn-performance-android').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-flipper-performance-plugin/android')
Thanks for developing this plugin
I'm trying to build my react-native app running
react-native run-android --variant debugtwo
, "debugtwo" being a variant in my build.gradle.It should be no different from the release variant, except from react enviroment variables, which are hardcoded for debug purposes and a different app id from the release variant.
I get this error
The current setup
ReactNativeFlipper.java in the "debugtwo" directory structure
I've copied the exact same structure from the regular "debug" variant, so the class file ReactNativeFlipper.java is in the correct position:
android/app/src/debugtwo/java/it/example/app/ReactNativeFlipper.java
I get no errors with flipper iself or flipper plugins like
CrashReporterPlugin
, since i put to have flipper available in a release like buildbuild.gradle
Something with the autolinking of the dependencies seems wrong, so i also tried manually linking like this
in android/settings.gradle
and in android/app/build.gradle:
implementation project(':react-native-flipper-performance-plugin') // add this line
I have also checked the node version used in android studio and the default on my machine with
nvm current
and they match (16.15.0)The text was updated successfully, but these errors were encountered: