简体   繁体   English

无法在 android 模拟器上运行 react-native 应用程序,因为“C:/User/firstname”未被识别为内部或外部命令

[英]Unable to run react-native app on android emulator because 'C:/User/firstname' is not recognized as internal or external command

I am running 'npx react-native start' on one terminal and waiting for it to start app and then running 'npx react-native run-android' on other terminal to start app but receiving this error... any solution plz?我在一个终端上运行'npx react-native start'并等待它启动应用程序,然后在另一个终端上运行'npx react-native run-android'以启动应用程序但收到此错误......请问有什么解决方案吗? i think may the white space between firstname and lastname(OK Computers) of my username is creating fuss but how can i resolve it.我认为我的用户名的名字和姓氏(OK 计算机)之间的空白可能会引起大惊小怪,但我该如何解决。

错误截图

Simply my computer name consisted of two words separated by a white space(for example: "Ali Azlan" the white space btw Ali and Azlan will create problem, I don't know why and how npx works but it only works with single name(no whitespace between). So I changed name of my computer to single name ie Ali using these instructions Windows 10 - Username with whitespace and PATH follow the longest answer on that link. but reading cautions below before doing so,只是我的计算机名称由两个由空格分隔的单词组成(例如:“Ali Azlan”空格 btw Ali 和 Azlan 会产生问题,我不知道 npx 为什么以及如何工作,但它仅适用于单个名称(之间没有空格)。所以我使用这些说明将我的计算机的名称更改为单个名称,即 Ali Windows 10 - 带有空格和 PATH 的用户名遵循该链接上最长的答案。但在这样做之前请阅读以下注意事项,

  1. my some apps stopped working after doing that so I had to reinstall them.我的一些应用程序在这样做后停止工作,所以我不得不重新安装它们。
  2. don't forget to create restore point to restore to previous condition if u run into some problem.如果您遇到一些问题,请不要忘记创建还原点以恢复到以前的状态。
  3. I didn't check all the appearance of my username by pressing f3 and following stuff again and again(it will took forever), I just exported registry editor and opened the exported file with sublime text editor searched for my old username and replaced all username at once by clicking of "find and replace all" and saved that registry files, but I took care of some technical things which I can't tell exactly here, otherwise I would run into problems.我没有通过按 f3 和一次又一次的跟踪来检查我的用户名的所有外观(这将花费永远),我只是导出注册表编辑器并使用 sublime 文本编辑器打开导出的文件搜索我的旧用户名并替换所有用户名通过单击“查找并全部替换”并保存该注册表文件,但我处理了一些我无法在这里确切说明的技术问题,否则我会遇到问题。 well after changing username I imported that changed registry editor file back into registry editor, it said it is erroneous but I ignored that and just restarted computer and followed remaining steps and it worked fine after then.更改用户名后,我将更改后的注册表编辑器文件导入回注册表编辑器,它说这是错误的,但我忽略了这一点,只是重新启动计算机并按照剩余的步骤进行操作,此后它工作正常。
  4. I would recommend if ura bit computer genius only then try to tweak registry else just go for some other solution which may be is to reinstall windows and set single named username this time我会建议如果 ura 位计算机天才然后尝试调整注册表,否则就去寻找其他一些解决方案,这可能是重新安装 Windows 并设置单个命名用户名这次

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 react-native - 'adb' 未被识别为内部或外部命令 - react-native - 'adb' is not recognized as an internal or external command 无法运行本机应用程序 android 模拟器 - Unable to run react native app android emulator 在React中,“adb”不会被识别为内部和外部命令 - In React native 'adb' is not recognized as an internal and external command 无法在 Android 模拟器上运行 React-Native 应用程序 - Windows - Cannot run React-Native app on Android emulator - Windows 在带有 Apple M1 芯片的 Apple MacBook Pro 中运行“react-native run-android”命令时无法检测到模拟器 - Unable to detect emulator when `react-native run-android` command is ran in Apple MacBook Pro with Apple M1 Chip 无法在Android上运行最新的React-Native应用 - Unable to run latest react-native app on android Android 模拟器无法启动 react-native 应用程序,因为空间不足 - Android emulator cant start react-native app because has not enough space 'gradlew.bat' 不被识别为内部或外部命令,反应原生 - 'gradlew.bat' is not recognized as an internal or external command, react native Android Emulator无法在react-native run-android中运行我的应用 - Android Emulator does not run my app in react-native run-android android'无法识别为内部或外部命令 - android' is not recognized as an internal or external command
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM