【发布时间】:2019-12-24 17:36:49
【问题描述】:
我已在其他项目中运行此记录器而运行react-native log-android 时没有问题@ 为什么记录器在此项目文件夹中失败。这些大多是开箱即用的react-native init NewProjects,变化很少。所以我很惊讶这个项目我无法运行记录器。我更喜欢 cmd 记录器。它比在 chrome 中运行更快。
λ react-native log-android
info Starting logkitty
The filename, directory name, or volume label syntax is incorrect.
error Command failed: 'C:\Users\{UserPIN}\AppData\Local\Android\Sdk/platform-tools/adb' logcat -c
The filename, directory name, or volume label syntax is incorrect.
. Run CLI with --verbose flag for more details.
Error: Command failed: 'C:\Users\{UserPIN}\AppData\Local\Android\Sdk/platform-tools/adb' logcat -c
The filename, directory name, or volume label syntax is incorrect.
at spawnLogcatProcess (c:\ws\mobile2\ReactRegLoc\node_modules\logkitty\build\android\adb.js:36:11)
at runAndroidLoggingProcess (c:\ws\mobile2\ReactRegLoc\node_modules\logkitty\build\android\adb.js:21:10)
at logkitty (c:\ws\mobile2\ReactRegLoc\node_modules\logkitty\build\api.js:137:85) at Object.logAndroid [as func] (c:\ws\mobile2\ReactRegLoc\node_modules\@react-native-community\cli-platform-android\build\commands\logAndroid\index.js:37:44)
at Command.handleAction (c:\ws\mobile2\ReactRegLoc\node_modules\react-native\node_modules\@react-native-community\cli\build\cliEntry.js:160:21)
at Command.listener (c:\ws\mobile2\ReactRegLoc\node_modules\commander\index.js:315:8)
at Command.emit (events.js:189:13)
at Command.parseArgs (c:\ws\mobile2\ReactRegLoc\node_modules\commander\index.js:651:12)
at Command.parse (c:\ws\mobile2\ReactRegLoc\node_modules\commander\index.js:474:21)
at setupAndRun (c:\ws\mobile2\ReactRegLoc\node_modules\react-native\node_modules\@react-native-community\cli\build\cliEntry.js:210:24)
【问题讨论】:
-
有什么解决办法吗?
-
现在我只是从路径似乎有效的项目文件夹中运行 log kitty。您不必在您正在运行的项目的文件夹中,log kitty 只需要正在运行,这样您就可以获得任何正在运行的项目的日志。我将查看错误报告@Reid。谢谢!
标签: android android-studio react-native