Solve the problem that the android simulator cannot access the Internet-host is unresolved

Source: Internet
Author: User

1. Add Android tools to the Windows environment variable path, D: \ Android \ android-sdk_r3-windows \ Android-SDK-Windows \ tools \.
2. Start the android simulator in two ways.

Method 1: Open the command line window (shortcut: Windows key + r) and enter emulator-AVD in cmd. <youravdname>

In the second method, right-click the android project of eclipse and choose run as> Android Application to run the project.

3. on the window, open the command line window and enter the ADB shell command under cmd. This command is used to enter the Linux System of the simulator. (If the command cannot be identified, check whether the environment variable settings are correct or enter the command in the tools directory of Android)

4. Run the following command in ADB shell mode:

Sqlite3/data/COM. android. providers. settings/databases/settings. DB "insert into system values (99, 'HTTP _ proxy', '10. 10.26.252: 1080 ')"

5. Run the query command in ADB shell mode.

Sqlite3/data/COM. Android. providers. Settings/databases/settings. DB "select * from System"

6. Restart the android simulator,ProgramYou can log on to the HTTP website.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.