-
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
> Text must not be null or empty #25479
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. |
I found the cause. This is issue for react-native-community/cli-platform-android. See below Update to It works for me. |
I confirm it works with |
My solution is not correct. This is auto linkikg issue. Read this comment. react-native-community/cli#468 (comment) |
No, it doesn't work without the change you proposed. I saw that issue, but my project is a clean install with react-native init, I haven't a different structure. With your change it is working for me, but because it fails to execute that step:
|
@kidandcat in default template, there's no |
Yeah, in default template is The exact error I'm getting:
|
@kidandcat we recently released a fix for that. Please init once again and verify |
I was solved after install @react-native-community/cli |
Wow, that was very recently, I initialized it yesterday. Thanks @thymikee its working now! |
Closing as resolved then :) |
I have the same issue. What do you mean by "init once again"? |
I referred to the fact that the faulty project was created through init yesterday, before a fix in the cli was published. What you can do in existing codebase is make sure @react-native-community/cli is at 2.0.2 version (check the lock file, remove the cli entry and reinstall packages so the newest version is fetched) |
For those who are working with "standard" monorepo structure, like packages/
|- app1/
| |- package.json
| |- ios/
| |- src/
| `- android/
`- app2/
|- package.json
// ... Try the following settings.
apply from: file("../../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle");
applyNativeModulesSettingsGradle(settings, "../../../packages/app1");
apply from: file("../../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle");
applyNativeModulesAppBuildGradle(project, "../../../packages/app1"); DetailI tried settings described here , then another error showed up:
Also, I checked
// node ./node_modules/react-native/cli.js config
{
"root": "/path/to/myapp",
"reactNativePath": "/path/to/myapp/node_modules/react-native",
"dependencies": {},
"commands": [],
"assets": [],
"platforms": {},
"haste": {
"providesModuleNodeModules": [],
"platforms": []
},
"project": {}
} So I came up to the solution. |
@acro5piano I'm on the same situation than you, but it's not clear to me from you message what is the solution that worked for you. Could you please give more details? Thanks :) |
@olistic I updated my comment above. I made it a little bit clear and fix some typos. In short,
For more information, please refer to the cli package's source code. |
@acro5piano Thank you! So basically what's different between what's explained here and what ended up working for you is: // app1/android/settings.gradle
-applyNativeModulesSettingsGradle(settings, "../../..")
+applyNativeModulesSettingsGradle(settings, "../../../packages/app1") (and the analogous for For some reason that is not working for me. In my case, my monorepo structure doesn't have a
When I was using 0.59, I followed this tutorial which worked fine. With 0.60 and the new CLI 2.0 I was trying to apply those same steps plus some variations I found necessary, but I'm stuck at this point. I will keep researching. |
@olistic
Yes. Thank you for your researching. Good luck. |
@acro5piano @olistic I've updated the autolinking guide to provide some more information about how it's set up currently in the default template and when having custom root: react-native-community/cli#505. Hope that clears some confusions. If you have ideas on how to make it more approachable, I'd be glad to include them :) |
I also got the We have two separate repo for Android / iOS with each a submodule pointing towards the shared This the structure on the Android project: root/
|- app/
|- build.gradle
|- setting.gradle
|- react-native/ (git submodule)
|- node_modules/
|- package.json Given the above structure, this is how I defined my gradle files:
apply from: file("react-native/node_modules/@react-native-community/cli-platform-android/native_modules.gradle")
applyNativeModulesSettingsGradle(settings, "react-native/")
apply from: file("../react-native/node_modules/@react-native-community/cli-platform-android/native_modules.gradle")
applyNativeModulesAppBuildGradle(project, "react-native/") I believe the paths above are correct for that project structure because otherwise I get the Any help is welcome 👍 |
@mattijsf your project structure is not quite common. CLI can't figure out where you android project is. Try running |
I still can't make the I made a repo trying to do it. With this setup I still get:
|
Okay I just read everything above and I find it clear as mud. Sorry, perhaps someone can provide clarity. I have this error in my Jenkins build only:
Others mentioned something about
Mention was also made of
From what I have gathered here: The above file is correct. So what exactly is wrong here and how do I fix it? In terms of
The solution that @ryohlan gives is not the line of code that my error is complaining about. |
Still able to reproduce the issue with v2.8.3. Should this be re-opened since there are still a few folks experiencing the issue - @thymikee ? |
I'm not gonna reopen this. People face this issue for different reasons. Please create a new issue with a detailed description and a repro we can download and investigate. |
Will do, thx |
I tried this and the newest version is not fetched, it continues to fetch version |
I confirm it works with def command = "../node_modules/.bin/react-native config" |
Where do we put this 'def command' line?? |
@runny2018 edit native_modules.gradle file located at ..\node_modules@react-native-community\cli-platform-android |
Instead of mangling in node_modules, please update the |
Unfortunately upgrading the cli doesn't fix the problem. I am including in the settings.gradle at the bottom: The error message produced is:
Line 182 boils down to: I verified I had the latest version:
Any help appreciated. |
@sgeier please create a new issue in https://github.com/react-native-community/cli/ repo, with a minimal reproduction of your project structure. Otherwise we can't help. |
In another thread grabbou wrote that this error comes up when "project.android" is not properly set or something. Can you point me to where this config is read out? |
@thymikee double check that there is no |
@borapop it works for me, thank you so much!! |
It happened in
It worked for me. |
|
When I execute react-native run-android. I have the following:
FAILURE: Build failed with an exception.
Where:
Script 'C:\Users\zenz\programs\test_app\node_modules@react-native-community\cli-platform-android\native_modules.gradle' line: 182
What went wrong:
A problem occurred evaluating settings 'test_app'.
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
After I try to make in file 'node_modules@react-native-community\cli-platform-android\native_modules.gradle:
def command = "node ./node_modules/.bin/react-native config"
to
def command = "./node_modules/.bin/react-native config"
It does not work for me. I need help
The text was updated successfully, but these errors were encountered: