Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/217.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 在emulator中获取系统IP地址_Android_Android Emulator - Fatal编程技术网

Android 在emulator中获取系统IP地址

Android 在emulator中获取系统IP地址,android,android-emulator,Android,Android Emulator,有人能为emulator提供一个解决方案来获得我自己的本地IP(而不是本地IP)吗 10.0.2.15)? 但我想得到我的系统的实际IP。有吗 解决方案 仿真器正在使用一个您已经发现的专用网络,但是您可以激发获取公共IP地址的意图 $ adb shell am start -a android.intent.action.WEB_SEARCH -e query "what is my ip" 运行这是emulator的shell将打开浏览器并显示您的公共IP地址。请参阅此[post][1][1

有人能为emulator提供一个解决方案来获得我自己的本地IP(而不是本地IP)吗 10.0.2.15)? 但我想得到我的系统的实际IP。有吗
解决方案

仿真器正在使用一个您已经发现的专用网络,但是您可以激发获取公共IP地址的意图

$ adb shell am start -a android.intent.action.WEB_SEARCH -e query "what is my ip"

运行这是emulator的shell将打开浏览器并显示您的公共IP地址。

请参阅此[post][1][1]:谢谢您的支持。你能不能再详细解释一下你的答案,因为我们是android新手,所以我们不太清楚