Im trying to access my Api key from the env file, but i dont really know how to access it, i tried multiple solutions.
here's my build.gradle :
defaultConfig {
manifestPlaceholders = [API_KEY: "$process.env.REACT_NATIVE_PLACES_API_KEY"]
}
here's the AndroidManifest.xml :
<meta-data android:name="com.google.android.geo.API_KEY" android:value="${API_KEY}" />
the error i had:
* What went wrong:
A problem occurred evaluating project ':app'.
> Could not get unknown property 'process'
then i tried changing
$process.env.REACT_NATIVE_PLACES_API_KEY with $System.env.REACT_NATIVE_PLACES_API_KEY
There's no more error, however the map isn't rendering anymore.
unless i use the apikey in string format, so how can i access it as a variable?