React-native-config: Package not working on android release build only

Created on 2 Oct 2019  路  6Comments  路  Source: luggit/react-native-config

Using version: 0.11.7

When running

ENVFILE=.env.production ./gradlew assembleRelease

the logs say

Reading env from: .env.production

but the configs can't be imported / are empty. And this only happens on android relase build. debug is fine, and iOS is fine completely. This bug also came out of nowhere. Anybody else experiencing this? Tested with Android 8 and 9

Most helpful comment

I stopped using this package.

All 6 comments

it was an issue with proguard. No clue why it popped up suddenly

hello, how did you fix the issue?

I stopped using this package.

:v . Good decision to be honest. Setup was already complicated enough + no way I was able to make it work. Spent 3/4 hours doing this. Now decided not to use this plugin. Can't rely on this in production applications.

I stopped using this package.

what are you using now?

if you only have a problem with an android release build then make sure you ignore your.app.package.name.BuildConfig from proguard.

Was this page helpful?
0 / 5 - 0 ratings