Unable to run `react-native log-android` in windows
See original GitHub issueWhen I attempt to run react-native log-android in windows I get the following error:
info Starting logkitty The filename, directory name, or volume label syntax is incorrect. error Command failed: 'C:\Users\reidk\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\reidk\AppData\Local\Android\sdk/platform-tools/adb' logcat -c The filename, directory name, or volume label syntax is incorrect.
It appears as though some of the slashes are facing the wrong direction in the command.
React Native version: 0.60.5
Steps To Reproduce
- Fresh install of a project running 0.60.5
- run
react-native log-android
Describe what you expected to happen: To open the logcat
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:8
Top Results From Across the Web
Unable to run react-native app on android emulator because ...
reactjs - Unable to run react-native app on android emulator because 'C:/User/firstname' is not recognized as internal or external command - ...
Read more >Troubleshooting - React Native
If you run into issue where executing npm run android on macOS throws the above error, try to run sudo chmod +x android/gradlew...
Read more >Addressing common errors in React Native - LogRocket Blog
Failed to install the app; Unable to load script; React Native run-android command is unrecognized; react-native command not found ...
Read more >React Native for Android development on Windows
If you want to run your project on an Android emulator, you shouldn't need to take any action as Android Studio installs with...
Read more >Troubleshoot known issues with Android Emulator
On ChromeOS, Android Virtual Devices (AVDs) might fail to launch because the libnss3 dependency is missing. To launch the AVDs successfully, run ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

It appears to be an issue with logkitty that manifested itself with the last CLI update.
If I change logkitty’s build/android/adb.js file to do the following I can get it to function: Line 29:
return process.env.ANDROID_HOME ? ``${process.env.ANDROID_HOME}\\platform-tools\\adb`` : 'adb';^^I cant seem to figure out how to properly escape backitics, but the above line should only have one backtick before the $ and after adb Line 34:(0, _child_process.execSync)(${adbPath} logcat -c);Its hackish, but works for now.
Yeah removing a single quotes in line number 34 worked for me. The line number 34 should be (0, _child_process.execSync)(
${adbPath} logcat -c); (Only backtick no quotes required)