Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 28476

How to set ENVFILE in Terminal to generate Android Release APK?

$
0
0

I'm trying to build APK from command line in my React Native project. I've used react-native-config plugin to define my API URLs based on selected environment.

When I try to launch the app on emulator with the command (from Terminal), ENVFILE=.env.dev react-native run-android, app builds and launches properly.

But when I try to generate Release build using the command (from Terminal), ENVFILE=.env.dev && cd android && ./gradlew clean build, command fails with the log:

> Configure project :app
Reading env from: .env
**************************
*** Missing .env file ****
**************************

Question: How to build Release APK using ENVFILE from Terminal?


Viewing all articles
Browse latest Browse all 28476

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>