分类 默认分类 下的文章

菜单中选择 ... -> Phone -> SMS message,发送短信后进入模拟器的短信应用就可以将文本复制到模拟器内的剪贴板了。

Android Emulator Copy & Paste: Back by popular demand, we added back the Copy & Paste feature to the latest Emulator (v25.3.1). We have a shared clipboard between the Android Emulator and host operating system, which will allow you to copy text between both environments. Copy & Paste works with x86 Google API Emulator system images API Level 19 (Android 4.4 - Kitkat) and higher.

如果镜像 API Level 高于 18,直接复制粘贴就好,和系统剪贴板互通。

如果 Android 模拟器无法上网,测试 adb shell 里 ping 域名解析不出 IP,可以试试用 ./emulator/emulator -avd <name> -dns-server 1.1.1.1 启动。

When starting the emulator at the command line, you can also use the -dns-server <serverList> option to manually specify the addresses of DNS servers to use, where <serverList> is a comma-separated list of server names or IP addresses. You might find this option useful if you encounter DNS resolution problems in the emulated network (for example, an "Unknown Host error" message that appears when using the web browser).

https://developer.android.com/studio/run/emulator-networking#dns