Comments (17)
@joncursi edit strings.xml like this
<string name="facebook_app_id">@string/FACEBOOK_APP_ID</string>
Note: FACEBOOK_APP_ID should be present in .env and if you are using different files for different environment (eg. staging, production) then in them too.
from react-native-config.
This is working on my computer but is not working on Bitrise build system
String.xml
<resources>
<string name="facebook_app_id">@string/FACEBOOK_APP_ID</string>
<string name="fb_login_protocol_scheme">@string/FACEBOOK_LOGIN_PROTOCOL_SCHEME</string>
</resources>
I have aunique .env
file
FACEBOOK_APP_ID=00000001
FACEBOOK_LOGIN_PROTOCOL_SCHEME=fb00000001
:app:processReleaseResources/Users/vagrant/git/android/app/build/intermediates/res/merged/release/values/values.xml:923:36-59:
AAPT: No resource found that matches the given
name (at 'facebook_app_id' with value '@string/FACEBOOK_APP_ID').
Does anybody here use a build system and had similar problems ?
from react-native-config.
@fforres Yes, in my particular case the problem was that
on the build steps I'm moving the folder after cloning it,
but mv
command wasn't copying hidden files by default,
so the .env
file didn't get copied and therefore the issue.
The solution was to run shopt -s dotglob
before mv
command so that .env
gets copied over with the src files.
I hope it helps!
from react-native-config.
This would be great. Any hints on how to implement this? I could give it a try.
from react-native-config.
Its working. Tested for react-native-facebook-login!
from react-native-config.
@prtkkmrsngh how'd you get it to work? I'm trying to do the same for react-native-facebook-login
from react-native-config.
I'm trying to do this in a dynamic way using this package:
<string name="facebook_app_id">appIDhere</string>
from react-native-config.
Same problem here @alfonsodev
Locally it's no issue, but on a CI/CD environment (budydbuild in my case) it does not work.
Did you find any solution?
from react-native-config.
Same problem here.Any update?
from react-native-config.
Any news on that?
from react-native-config.
Try it
<resources>
<string name="facebook_app_id">{$FACEBOOK_APP_ID}</string>
<string name="fb_login_protocol_scheme">{$FACEBOOK_LOGIN_PROTOCOL_SCHEME}</string>
</resources>
from react-native-config.
I am trying to access the string from .env in strings.xml but it shows the error: resource string/APP_NAME (aka com.APP:string/APP_NAME) not found
. Any update?
from react-native-config.
Looks like any access to string xml results on not found only on CI. Also looking for a solution
from react-native-config.
this issue happened to me as well but only on CircleCI pipeline, not happening in local, I don't know why
from react-native-config.
any update on it? I am also facing the same issue. Locally it works in a perfect way but not on CI.
from react-native-config.
@KFrysztak for me the issue is that I'm decrypting the env file in the first job of the NPM packages installation, not in the APK build job, and it turns out that the ENV file does not exist because I need it to persist in the workspace, but this is not wise, I've put the env decryption step in the APK build job, before the step of the assemble release step, and it worked as expected.
from react-native-config.
I am trying to access the string from .env in strings.xml but it shows the error:
resource string/APP_NAME (aka com.APP:string/APP_NAME) not found
. Any update?
any workaround?
from react-native-config.
Related Issues (20)
- 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 2
- 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 5
- [Question] - Is this lib abandoned?
- Compatibility of react-native-config with React Native 0.73+ HOT 1
- Visionos podspec misconfiguration resulting in build failure HOT 1
- App crashes on launch when using in `GoogleService-Info.plist` on iOS
- App crashes on android release build HOT 2
- [Question] Windows: Package.appxmanifest
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.