You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error Failed to install the app. Command failed with exit code 1: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * Where: Build file 'E:\\MobileAppV2\android\app\build.gradle' line: 104 * What went wrong: A problem occurred evaluating project ':app'. > Could not get unknown property 'MYAPP_UPLOAD_STORE_FILE' for SigningConfig$
AgpDecorated_Decorated{name=release, storeFile=null, storePassword=null, keyAlias=null, keyPassword=null, storeType=pkcs12, v1SigningEnabled=true, v2SigningEnabled=true, enableV1Signing=null, enableV2S
igning=null, enableV3Signing=null, enableV4Signing=null} of type com.android.build.gradle.internal.dsl.SigningConfig$AgpDecorated. * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. > Get more help at https://help.gradle.org. BUILD FAILED in 1s.
But it should works fine because I'm using debug build and dont want to set my release env variables during debug builds ( it works fine on release builds if I set them )
System:
OS: Windows 11 10.0.22631
CPU: "(16) x64 AMD Ryzen 7 5800H with Radeon Graphics "
Memory: 15.79 GB / 31.86 GB
Binaries:
Node:
version: 22.11.0
path: D:\Programs\nodejs\node.EXE
Yarn:
version: 1.22.18
path: ~\AppData\Roaming\npm\yarn.CMD
npm:
version: 10.9.0
path: D:\Programs\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK: Not Found
IDEs:
Android Studio: Not Found
Visual Studio: Not Found
Languages:
Java: 17.0.13
Ruby:
version: 2.4.10
path: D:\Programs\Ruby24-x64\bin\ruby.EXE
npmPackages:
"@react-native-community/cli":
installed: 15.0.1
wanted: 15.0.1
react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.76.3
wanted: 0.76.3
react-native-windows: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
uchar
changed the title
React native debug build tries to load env variables in release section of build.gradle
React native android debug build tries to load env variables in release section of build.gradle
Dec 5, 2024
This is an Android question and is not necessarily related to React Native.
The problem you're having is that the build.gradle file is all "executed" for both debug and release variants, even if you're attempting to build only one of the two.
Description
This gradle config(android/app/build.gradle)
with
react-native run-android
generate this errorBut it should works fine because I'm using debug build and dont want to set my release env variables during debug builds ( it works fine on release builds if I set them )
Steps to reproduce
1_ Create empty project
2_ Add above to build.grade
3_ Use
npm run android
and you should see the error(You can also simply look at reproducer output https://github.com/uchar/react-native-build-bug/actions/runs/12184080305/job/33987094131 )
React Native Version
0.76.3
Affected Platforms
Runtime - Android
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://github.com/uchar/react-native-build-bug
Screenshots and Videos
No response
The text was updated successfully, but these errors were encountered: