Comments (16)
ensure that you add your BuildConfig to your proguard rules. Took me hours to figure out. IMHO the README needs a major makeover. This should be pretty much on top it.
In your proguard-rules.pro
add
-keep class my.app.package.BuildConfig { *; }
Obviously you need to adapt the package to your actual app package name
from react-native-config.
-keep class my.app.package.BuildConfig { *; }
Thankyou! Its working after add this line pro-guard
from react-native-config.
ensure that you add your BuildConfig to your proguard rules. Took me hours to figure out. IMHO the README needs a major makeover. This should be pretty much on top it.
In your
proguard-rules.pro
add-keep class my.app.package.BuildConfig { *; }
I had done the above, but it still didn't work. Thank you @rburgst for writing also this, which I had missed!:
Obviously you need to adapt the package to your actual app package name
With that it works properly. As stated in another issue, the readme needs an overhaul!
from react-native-config.
Is it working for you in dev mode?
I am unable to get it working with new RN project
from react-native-config.
xlcrr I had to upgrade my RN to 0.72.3 the latest version.
from react-native-config.
It's working for you now @eakenbor ?
from react-native-config.
xlcrr I had to upgrade my RN to 0.72.3 the latest version.
Thanks for the reply. I am using 0.72.3 and its not working out of the box on android, will post my solution when I find it
from react-native-config.
Thanks for the tip but updating proguard-rules.pro did not work for me
If anyone would like to help collaborate on an open source project with latest versions of everything I would really love some help here!
https://github.com/OpenLitterMap/react-native
Happy to post the solution when I get it
from react-native-config.
Latest minor react-native release fixed it for me, 0.72.3 -> 0.72.4
from react-native-config.
No idea why this fixed it for me but I was running through an npm script that was also doing ./gradlew clean
which stopped this from working properly. Removing that fixed the issue for me.
from react-native-config.
from react-native-config.
This did not work for me
from react-native-config.
Latest minor react-native release fixed it for me, 0.72.3 -> 0.72.4
I have upgraded to 0.72.4
and 0.72.5
but it still isn't working for me.
from react-native-config.
Hello, I was trying to update from react-native 0.71.11 to 0.72.6 and I started to face the same issue, any news on that?
from react-native-config.
After including the ENVFILE env var right before running react-native it worked, it seems react is trying to make some validation with build gradle before ./gradlew install
, and then the env file was not injected
from react-native-config.
I have problem same. Someone help me!
from react-native-config.
Related Issues (20)
- Config is empty after upgrade to RN 0.71 HOT 31
- "/tmp/envfile" is buggy when its contents are empty string (iOS)
- Cannot invoke method toInteger() on null object HOT 2
- Inconsistent Environment File Loading in Android Studio vs React Native CLI
- ERROR in ./src/CONFIG.ts 3:0-41 [web-server] Module not found: Error: Can't resolve 'react-native-config' in '/Volumes/Personal/code-work/rn-projects/zaions/expensify-app-fork/src'
- is it possible to pass params but not set ENVFILE when run assemble release HOT 1
- How to import NSExceptionDomains as an environment variable?
- Variable are UNDEFINED on IOS HOT 14
- Could not find method android() for arguments [dotenv_4bgzrl46y7i0xnvnmgzr6qa4c$_run_closure1@3fa75e8b] on project ':app' of type org.gradle.api.Project.
- How to read config in Kotlin class in react native 0.73? HOT 1
- RNConfig Empty Android HOT 1
- MainApplication.kt:27:58 Type mismatch: inferred type is String but Boolean was expected HOT 1
- Not working on ReactNative 0.73 HOT 1
- Error retrieving namespace value from .env file during build process
- hey, did you find a way to make it work?
- Update the documentation HOT 3
- Issue with kotlin DSL
- ios undefined problem HOT 3
- [Question] - Is this lib abandoned?
- Compatibility of react-native-config with React Native 0.73+ HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-config.