后退按钮在 Android 模拟器上不起作用

Try*_*amm 4 android-emulator android-sdk-2.3

我尝试启动 android sdk 模拟器,但是当我按后退按钮时,出现此错误:

INFO    | Critical: Failed to load https://maps.googleapis.com/maps/api/mapsjs/gen_204?csp_test=true: The 'Access-Control-Allow-Origin' header has a value 'qrc://' that is not equal to the supplied origin. Origin 'qrc://' is therefore not allowed access. (qrc:/html/js/common.js:0, (null))

INFO    | Critical: Failed to load https://maps.googleapis.com/maps/api/mapsjs/gen_204?csp_test=true: The 'Access-Control-Allow-Origin' header has a value 'qrc://' that is not equal to the supplied origin. Origin 'qrc://' is therefore not allowed access. (qrc:/html/js/common.js:0, (null))
Run Code Online (Sandbox Code Playgroud)

我使用 Ubuntu 并尝试通过终端启动模拟器,我使用 google cmdline-tools(最新版本)的 avdmanager,这是我尝试使用的 AVD:

    Name: my_avd_29ii
    Path: /home/user/.android/avd/my_avd_29ii.avd
  Target: Google APIs (Google Inc.)
          Based on: Android 10.0 (Q) Tag/ABI: google_apis/x86
  Sdcard: 512 MB
Run Code Online (Sandbox Code Playgroud)

Tam*_*any 8

最好的选择是(需要为您安装的每个模拟器完成)

视窗

  1. %USERPROFILE%\.adnroid\avd\<Emulator Name>.avd
  2. 编辑config.ini
  3. 改成hw.keyboard=nohw.keyboard=yes

苹果

  1. ~/.android/avd/<Emulator Name>.avd
  2. 编辑config.ini
  3. 改成hw.keyboard=nohw.keyboard=yes

答案基于这篇文章