问题
I created an app with Android Studio on my PC with Windows 10. A wrong date (PC-Date minus 2 hours) is shown in the emulation device 'Pixel_2_API_28 [emulator-5554] and I try to correct this adb date in the app with Java:
final long jetzt = System.currentTimeMillis() / 1000L;
final ProcessBuilder builder = new ProcessBuilder("adb", "date",
Long.toString(jetzt));
builder.redirectErrorStream(true);
builder.redirectOutput(ProcessBuilder.Redirect.INHERIT);
final Process process = builder.start();
process.waitFor();
I get the error while starting the app: W/System.err: java.io.IOException:
Cannot run program "adb": error=13, Permission denied
Can anyone give me a hint? Thank you
来源:https://stackoverflow.com/questions/61834015/emulated-android-device-shows-wrong-date-windows-10