React-native-config: Cannot React Env. Variables With React Native 0.60.0

Created on 12 Jul 2019  路  3Comments  路  Source: luggit/react-native-config

Just created new project but it cannot read the env variables file and because the version of react-native doesnt require the use of react-native link as it auto links.

However, logging the Config has the following information

{ FLAVOUR: '', DEBUG: true, VERSION_CODE: 1, ... }

Most helpful comment

@nodece this not work for me :(

All 3 comments

Am also getting this - using react-native link react-native-config fixes it, but you just have to put up with the build warnings for now

@Quadriphobs1
Please add apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle" to android/app/build.gradle

@nodece this not work for me :(

Was this page helpful?
0 / 5 - 0 ratings