【发布时间】:2022-07-25 16:38:49
【问题描述】:
我尝试启动一个 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))
我使用 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
【问题讨论】:
-
我目前正在处理它,我可以马上告诉你认为这个错误是无关的,只需使用标志
-no-location-ui并且它不会显示。如果您真的需要后退按钮,您也可以使用adb shell input KEYCODE_BACK为我工作,但这非常烦人,这将是控件正常工作,我会继续挖掘,但如果你找到它,请发布答案,它是让我生气。
标签: android-emulator android-sdk-2.3