-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Package is not a valid resource name #25645
Comments
Thanks for submitting your issue. Can you take another look at your description and make sure the issue template has been filled in its entirety? 👉 Click here if you want to take another look at the Bug Report issue template. |
Finally found this which is same as my problem. After remove package.json from import, this issue is solved. I will close this issue. |
facebook/metro#420 fixed it for me |
Where do you remove it |
Don't import |
@crispywong |
Same here... What should I do instead ? |
can someone help answer this? i'm using the same method to show app version as well |
Like the mentioned thread, the answer is in not importing package.json file. Easy workaround is to make a copy of package.json and import that file instead. Just keep copying package.json to the renamed file before publishing. |
ok noted, thanks for the answer. |
@sbvorpagel you can use
|
@sertony, just to be clear, I believe |
I imported |
@honeyp0t I dont know for you, but my package-lock.json is almost 1Mb. Quite a lot just to get the version...
|
Having following issue when running command
./gradlew :app:assembleprodRelease
withenableHermes: true
. package.json is generated under folder android/app/build/generated/res/react/release/raw/ after execute commandThere are 2 product flavors (stag and prod) for the project. Using below dependencies:
package.json
Below is the hermes dependency added in android/app/build.gradle
Same error when running command
react-native run-android --variant prodRelease --appId <appId> --main-activity MainActivity
Even clean android/build folder using command
./gradlew :app:clean
, issue still persist. Is there any other way to fix this error?Any help would be very appreciated.
The text was updated successfully, but these errors were encountered: