I run the following command and my Android React Native app installs and launches but acts as if there is no .env file.
ENVFILE=.env.staging react-native run-android # bash
This command for run-ios works as expected.
"react-native-config": "^0.11.7",
"react-native": "0.59.10",
In MainApplication.java add the following line
import com.lugg.ReactNativeConfig.ReactNativeConfigPackage
and in getPackages method add:
return Arrays.<ReactPackage>asList(
new ReactNativeConfigPackage(), // add this line
// ... your packages
)
I hope it helps you, It worked for me.
That works @hlebon. Thank you so much!
Most helpful comment
In MainApplication.java add the following line
import com.lugg.ReactNativeConfig.ReactNativeConfigPackageand in getPackages method add:
I hope it helps you, It worked for me.