问题:
I am working on a cross-platform React Native mobile app.我正在开发一个跨平台的 React Native 移动应用程序。 I am writing console.log statements as I develop.我在开发时正在编写 console.log 语句。 I want to see these logging statements in Chrome while I'm running the Android app in the default Android emulator.当我在默认的 Android 模拟器中运行 Android 应用程序时,我想在 Chrome 中看到这些日志语句。 According to Facebook's docs I just need to "shake the device".根据Facebook 的文档,我只需要“摇动设备”。 How do I do this in the Android emulator?如何在 Android 模拟器中执行此操作?
To access the in-app developer menu:要访问应用内开发者菜单:
On iOS shake the device or press control + ⌘ + z in the simulator.在 iOS 上摇动设备或在模拟器中按下 control + ⌘ + z。 On Android shake the device or press hardware menu button (available on older >devices and in most of the emulators, eg in genymotion you can press ⌘ + m to >simulate hardware menu button click)在 Android 上摇动设备或按下硬件菜单按钮(适用于较旧的>设备和大多数模拟器,例如在 genymotion 中,您可以按 ⌘ + m 来>模拟硬件菜单按钮单击)
解决方案:
参考一: https://en.stackoom.com/question/2E6bh参考二: https://stackoom.com/question/2E6bh