Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error retrieving namespace value from .env file during build process #796

Open
psbdgr8 opened this issue Mar 20, 2024 · 0 comments
Open

Comments

@psbdgr8
Copy link

psbdgr8 commented Mar 20, 2024

Issue Description:

When configuring my .env file, I encountered an issue with retrieving the value of the namespace. While it successfully retrieves the "application ID", it fails to do so for the namespace. Interestingly, hardcoding the namespace allows the builds to proceed without errors in build.gradle

Error Message:

A problem occurred evaluating script.

error Failed to build the app: No package name found. We couldn't parse the namespace from neither your build.gradle[.kts] file at /Users/Dummy/exampleProject/android/app/build.gradle nor your package in the AndroidManifest at /Users/Dummy/exampleProject/android/app/src/main/AndroidManifest.xml.

Steps to Reproduce:

Configure the .env file with appropriate values for namespace and application ID.
Attempt to build the application.
Observe that while the application ID is retrieved successfully, the namespace causes build failures unless hardcoded.

Expected Behavior:

The application should be able to retrieve both the namespace and the application ID from the .env file without encountering build errors.

Additional Information:

Operating System: macOS Sonoma 14.3.1
Development Environment: android
React Native Version: 0.73.6

ALSO
How can I use the application ID from my .env to MainActivity.kt and MainApplication.kt

@psbdgr8 psbdgr8 changed the title Namespace for build.gradle Error retrieving namespace value from .env file during build process Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant