Special episode: android emulator is not connected to the Internet

1. Remove the PC side you have a spare DNS, leaving only a can. Ensure access to the Internet.

Note: although this is not necessary, not necessarily in the wrong spot him, but I recommend doing so, because in the end we were not sure whether our PC simulator and using a DNS, it is not, it will not cause access problems .

2. In the input mode adb shell: copy and paste

the sqlite3 /data/data/com.android.providers.settings/databases/settings.db "the INSERT the INTO System the VALUES (99, 'the http_proxy', ' 10.10.26.252 : 1080' ) "

3. In the query at adb shell mode to see if the change is successful.

sqlite3 /data/data/com.android.providers.settings/databases/settings.db "SELECT * FROM system"

4. Restart the Android emulator, the program can log http website.

 

Reproduced in: https: //my.oschina.net/cjkall/blog/195860

Guess you like

Origin blog.csdn.net/weixin_33843947/article/details/91756088