-
Notifications
You must be signed in to change notification settings - Fork 905
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" error occurs on Android Studio. #468
Comments
You'll need to set custom root (likely same for iOS). Here are the docs on it :) https://github.com/react-native-community/cli/blob/master/docs/autolinking.md#custom-root-monorepos-1 |
Oh I just thought that outputting a helpful message with autolinking docs link if the config command output is empty would be really helpful. Would you like to contribute that? |
This comment has been minimized.
This comment has been minimized.
The above did not fix the problem for me, but a similar update is getting me much closer (but still not working app.... and this is a brand new app): {root}/node_modules/@react-native-community/cli-platform-android/native_modules.gradle:173 -def command = "node ./node_modules/react-native/cli.js config" |
For me it was just something stupid, in the file react-native.config.js, I just commented these lines:
|
Hi, I am also getting this error, and . I cannot seem to configure it correctly with the current options(I am hoping there is something I missed 😊 ) currently we have a structure like
Setting root to the project root, it will try to run Setting the root to Both errors makes sense, since the project root does not contain an rn app, and What does work is keeping the root at the rn-app-1 workspace and change the command to I know there is an option using the So, is there some setting I have missed, or would there be a possibility to add some config to tell rn-cli where to look for the rn-app config? |
@thymikee , how can I confirm if this -> https://github.com/react-native-community/cli/blob/master/docs/autolinking.md#custom-root-monorepos-1 is the issue with Azure DevOps build? I do not get this error locally, but my Azure DevOps person consistently does. Do you or anyone know if the above is something that must be applied when building react-native in Azure? |
please first verify the The problem was with using yarn. I use yarn instead of npm and was getting this error. when I reinstalled node then the problem was resolved. No need to change the node_modules files as it did manage to run but created several other problems later on. Hope this helps yarn lovers! |
Environment
System:
OS: macOS 10.14.5
CPU: (4) x64 Intel(R) Core(TM) i7-5557U CPU @ 3.10GHz
Memory: 168.03 MB / 16.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 10.13.0 - ~/.nvm/versions/node/v10.13.0/bin/node
Yarn: 1.2.1 - /usr/local/bin/yarn
npm: 6.8.0 - ~/.nvm/versions/node/v10.13.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
Android SDK:
API Levels: 21, 22, 23, 24, 25, 26, 27, 28
Build Tools: 22.0.1, 23.0.1, 23.0.2, 25.0.0, 25.0.2, 25.0.3, 26.0.1, 26.0.3, 27.0.3, 28.0.2, 28.0.3
System Images: android-24 | Google APIs Intel x86 Atom, android-27 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5522156
Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.6 => 16.8.6
react-native: 0.60.0 => 0.60.0
npmGlobalPackages:
create-react-native-module: 0.5.0
react-native-create-library: 3.1.2
react-native-git-upgrade: 0.2.7
Description
"Text must not be null or empty" error occurs on Android Studio.
See this issue facebook/react-native#25479
It works for me by updating this code to
def command = "../node_modules/.bin/react-native config"
But
react-native run-android
does not work fine.Reproducible Demo
The text was updated successfully, but these errors were encountered: