无法运行adb shell“ date`date +%m%d%H%M%Y.%S`”; [英] Cannot run adb shell "date `date +%m%d%H%M%Y.%S`"

查看:547
本文介绍了无法运行adb shell“ date`date +%m%d%H%M%Y.%S`”;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Android设备上运行React Native时,我有一个警告:

I have a warning when running React Native on an Android device:


调试器和设备时间偏移了60多秒。请
通过在
上运行 adb shell date`date +%m%d%H%M%Y.%S` 来更正此问题调试器机器

Debugger and device times had drifted by more than 60s. Please correct this by running adb shell "date `date +%m%d%H%M%Y.%S`" on your debugger machine

但是当我按照上述建议运行命令时,我得到了并且不允许进行操作错误:

But when I run the command as suggested above, I get and operation not permitted error:


日期:无法设置日期:不允许操作

date: cannot set date: Operation not permitted

我已经尝试过sudo,仍然得到相同的结果:

I already tried with sudo, still got same result:

sudo adb shell "date `date +%m%d%H%M%Y.%S`"


推荐答案

在模拟器内部,转到设置>日期和时间

Inside the emulator goto Settings > Date & Time


  1. 取消选择自动时区。

  2. 手动调整时区。

  3. 取消选择自动日期和时间;时间并设置正确的时间

这篇关于无法运行adb shell“ date`date +%m%d%H%M%Y.%S`”;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆