无法从Android Studio上的Android模拟器连接到互联网

时间:2017-03-08 18:21:11

标签: android android-studio emulation

我的模拟器完全没有互联网连接,我已经尝试过所有内容,按照本网站上的许多说明和其他许多说明但仍然无法弄明白...有人能告诉我是什么导致了这个问题吗?我设法在运行模拟器时生成此日志,提前感谢!

emulator:Android emulator version 25.3.0.0 (build_id 3394391)
emulator:Found AVD name 'Adem'
emulator:Found AVD target architecture: arm
emulator:argv[0]: 'emulator'; program directory: 'D:\Android\AndroidSDK\too
ls'
emulator:  Found directory: D:\Android\AndroidSDK/system-images\android-18\
google_apis\armeabi-v7a\

emulator:Probing for D:\Android\AndroidSDK/system-images\android-18\google_
apis\armeabi-v7a\/kernel-ranchu: file exists
emulator:Auto-config: -engine qemu2 (based on configuration)
emulator:  Found directory: D:\Android\AndroidSDK/system-images\android-18\
google_apis\armeabi-v7a\

emulator:try dir D:\Android\AndroidSDK\tools
emulator:try dir .
emulator:try dir ..\emulator
emulator:Found target-specific 64-bit emulator binary: ..\emulator/qemu/win
dows-x86_64/qemu-system-armel.exe
emulator:Adding library search path: '..\emulator/lib64'
emulator:  Found directory: D:\Android\AndroidSDK/system-images\android-18\
google_apis\armeabi-v7a\

emulator:  Found directory: D:\Android\AndroidSDK/system-images\android-18\
google_apis\armeabi-v7a\

emulator:GPU emulation enabled using 'host' mode
emulator: Adding library search path for Qt: '..\emulator\lib64\qt\lib'
emulator: Setting Qt plugin search path: QT_QPA_PLATFORM_PLUGIN_PATH=..\emu
lator\lib64\qt\plugins
emulator:Quoted param: [..\emulator/qemu/windows-x86_64/qemu-system-armel.e
xe]
emulator:Quoted param: [-verbose]
emulator:Quoted param: [-avd]
emulator:Quoted param: [Adem]
emulator: Running :..\emulator/qemu/windows-x86_64/qemu-system-armel.exe
emulator: qemu backend: argv[00] = "..\emulator/qemu/windows-x86_64/qemu-sy
stem-armel.exe"
emulator: qemu backend: argv[01] = "-verbose"
emulator: qemu backend: argv[02] = "-avd"
emulator: qemu backend: argv[03] = "Adem"
emulator: Concatenated backend parameters:
 ..\emulator/qemu/windows-x86_64/qemu-system-armel.exe -verbose -avd Adem
emulator: Android virtual device file at: C:\Users\Adem\.android\avd\Adem.i
ni
emulator: virtual device content at C:\Users\Adem\.android\avd\Nexus_5_API_
18.avd
emulator: virtual device config file: C:\Users\Adem\.android\avd\Nexus_5_AP
I_18.avd/config.ini
emulator: using core hw config path: C:\Users\Adem\.android\avd\Nexus_5_API
_18.avd/hardware-qemu.ini
emulator: Found AVD target API level: 18
emulator: Read property file at ../system-images\android-18\google_apis\arm
eabi-v7a\/build.prop
emulator: No boot.prop property file found.
emulator: Warning: config.ini contains invalid skin.path entry: _no_skin
emulator: autoconfig: -skin 1080x1920
emulator: autoconfig: -skindir (null)
emulator: autoconfig: -kernel ../system-images\android-18\google_apis\armea
bi-v7a\/kernel-ranchu
emulator: Auto-detect: Kernel image requires new device naming scheme.
emulator: Auto-detect: Kernel does support YAFFS2 partitions.
emulator: autoconfig: -ramdisk ../system-images\android-18\google_apis\arme
abi-v7a\/ramdisk.img
emulator: Using initial system image: ../system-images\android-18\google_ap
is\armeabi-v7a\/system.img
emulator: autoconfig: -data C:\Users\Adem\.android\avd\Nexus_5_API_18.avd/u
serdata-qemu.img
emulator: autoconfig: -initdata C:\Users\Adem\.android\avd\Nexus_5_API_18.a
vd/userdata.img
emulator: autoconfig: -cache C:\Users\Adem\.android\avd\Nexus_5_API_18.avd/
cache.img
emulator: autoconfig: -sdcard C:\Users\Adem\.android\avd\Nexus_5_API_18.avd
\sdcard.img
emulator: Physical RAM size: 512MB

emulator: System image is read only
emulator: GPU emulation enabled using 'host' mode
emulator: Found 2 DNS servers: 8.8.8.8 8.8.4.4
emulator: found magic skin width=1080 height=1920 bpp=16

emulator: WARNING: userdata partition is resized from 904 M to 5000 M

emulator: WARNING: encryption is off
emulator: Using default value for kernel Contiguous Memory Allocation.
emulator: Found 2 DNS servers: 8.8.8.8 8.8.4.4
Content of hardware configuration file:
  hw.cpu.arch = arm
  hw.cpu.model = cortex-a8
  hw.cpu.ncore = 2
  hw.ramSize = 512
  hw.screen = multi-touch
  hw.mainKeys = false
  hw.trackBall = false
  hw.keyboard = true
  hw.keyboard.lid = false
  hw.keyboard.charmap = qwerty2
  hw.dPad = false
  hw.gsmModem = true
  hw.gps = true
  hw.battery = true
  hw.accelerometer = true
  hw.audioInput = true
  hw.audioOutput = true
  hw.sdCard = true
  hw.sdCard.path = C:\Users\Adem\.android\avd\Nexus_5_API_18.avd\sdcard.img

  disk.cachePartition = true
  disk.cachePartition.path = C:\Users\Adem\.android\avd\Nexus_5_API_18.avd/
cache.img
  disk.cachePartition.size = 66m
  hw.lcd.width = 1080
  hw.lcd.height = 1920
  hw.lcd.depth = 16
  hw.lcd.density = 480
  hw.lcd.backlight = true
  hw.gpu.enabled = true
  hw.gpu.mode = host
  hw.gpu.blacklisted = no
  hw.initialOrientation = Portrait
  hw.camera.back = none
  hw.camera.front = none
  vm.heapSize = 256
  hw.sensors.light = true
  hw.sensors.pressure = true
  hw.sensors.humidity = true
  hw.sensors.proximity = true
  hw.sensors.magnetic_field = true
  hw.sensors.orientation = true
  hw.sensors.temperature = true
  hw.useext4 = true
  kernel.path = ../system-images\android-18\google_apis\armeabi-v7a\/kernel
-ranchu
  kernel.newDeviceNaming = yes
  kernel.supportsYaffs2 = yes
  disk.ramdisk.path = ../system-images\android-18\google_apis\armeabi-v7a\/
ramdisk.img
  disk.systemPartition.initPath = ../system-images\android-18\google_apis\a
rmeabi-v7a\/system.img
  disk.systemPartition.size = 550m
  disk.dataPartition.path = C:\Users\Adem\.android\avd\Nexus_5_API_18.avd/u
serdata-qemu.img
  disk.dataPartition.size = 5000m
  avd.name = Adem
.
QEMU options list:
emulator: argv[00] = "..\emulator/qemu/windows-x86_64/qemu-system-armel.exe
"
emulator: argv[01] = "-dns-server"
emulator: argv[02] = "8.8.8.8,8.8.4.4"
emulator: argv[03] = "-serial"
emulator: argv[04] = "null"
emulator: argv[05] = "-cpu"
emulator: argv[06] = "cortex-a15"
emulator: argv[07] = "-machine"
emulator: argv[08] = "type=ranchu"
emulator: argv[09] = "-m"
emulator: argv[10] = "512"
emulator: argv[11] = "-lcd-density"
emulator: argv[12] = "480"
emulator: argv[13] = "-kernel"
emulator: argv[14] = "../system-images\android-18\google_apis\armeabi-v7a\/
kernel-ranchu"
emulator: argv[15] = "-initrd"
emulator: argv[16] = "../system-images\android-18\google_apis\armeabi-v7a\/
ramdisk.img"
emulator: argv[17] = "-object"
emulator: argv[18] = "iothread,id=disk-iothread"
emulator: argv[19] = "-drive"
emulator: argv[20] = "overlap-check=none,cache=unsafe,index=0,id=sdcard,fil
e=C:\Users\Adem\.android\avd\Nexus_5_API_18.avd\sdcard.img.qcow2,l2-cache-s
ize=1048576"
emulator: argv[21] = "-device"
emulator: argv[22] = "virtio-blk-device,drive=sdcard,iothread=disk-iothread
"
emulator: argv[23] = "-drive"
emulator: argv[24] = "overlap-check=none,cache=unsafe,index=1,id=userdata,f
ile=C:\Users\Adem\.android\avd\Nexus_5_API_18.avd/userdata-qemu.img.qcow2,l
2-cache-size=1048576"
emulator: argv[25] = "-device"
emulator: argv[26] = "virtio-blk-device,drive=userdata,iothread=disk-iothre
ad"
emulator: argv[27] = "-drive"
emulator: argv[28] = "overlap-check=none,cache=unsafe,index=2,id=cache,file
=C:\Users\Adem\.android\avd\Nexus_5_API_18.avd/cache.img.qcow2,l2-cache-siz
e=1048576"
emulator: argv[29] = "-device"
emulator: argv[30] = "virtio-blk-device,drive=cache,iothread=disk-iothread"

emulator: argv[31] = "-drive"
emulator: argv[32] = "overlap-check=none,cache=unsafe,index=3,id=system,fil
e=C:\Users\Adem\.android\avd\Nexus_5_API_18.avd\system.img.qcow2,read-only"

emulator: argv[33] = "-device"
emulator: argv[34] = "virtio-blk-device,drive=system,iothread=disk-iothread
"
emulator: argv[35] = "-netdev"
emulator: argv[36] = "user,id=mynet"
emulator: argv[37] = "-device"
emulator: argv[38] = "virtio-net-device,netdev=mynet"
emulator: argv[39] = "-netdev"
emulator: argv[40] = "user,id=mynet2,net=10.0.3.0/24"
emulator: argv[41] = "-device"
emulator: argv[42] = "virtio-net-device,netdev=mynet2"
emulator: argv[43] = "-show-cursor"
emulator: argv[44] = "-L"
emulator: argv[45] = "..\emulator/lib/pc-bios"
emulator: argv[46] = "-append"
emulator: argv[47] = "qemu=1 androidboot.hardware=ranchu keep_bootcon early
printk=ttyAMA0 android.qemud=1 console=0 console=0 android.checkjni=1 qemu.
gles=1 ndns=2"
emulator: argv[48] = "-android-hw"
emulator: argv[49] = "C:\Users\Adem\.android\avd\Nexus_5_API_18.avd/hardwar
e-qemu.ini"
Concatenated QEMU options:
 ..\emulator/qemu/windows-x86_64/qemu-system-armel.exe -dns-server 8.8.8.8,
8.8.4.4 -serial null -cpu cortex-a15 -machine type=ranchu -m 512 -lcd-densi
ty 480 -kernel ../system-images\android-18\google_apis\armeabi-v7a\/kernel-
ranchu -initrd ../system-images\android-18\google_apis\armeabi-v7a\/ramdisk
.img -object iothread,id=disk-iothread -drive overlap-check=none,cache=unsa
fe,index=0,id=sdcard,file=C:\Users\Adem\.android\avd\Nexus_5_API_18.avd\sdc
ard.img.qcow2,l2-cache-size=1048576 -device virtio-blk-device,drive=sdcard,
iothread=disk-iothread -drive overlap-check=none,cache=unsafe,index=1,id=us
erdata,file=C:\Users\Adem\.android\avd\Nexus_5_API_18.avd/userdata-qemu.img
.qcow2,l2-cache-size=1048576 -device virtio-blk-device,drive=userdata,iothr
ead=disk-iothread -drive overlap-check=none,cache=unsafe,index=2,id=cache,f
ile=C:\Users\Adem\.android\avd\Nexus_5_API_18.avd/cache.img.qcow2,l2-cache-
size=1048576 -device virtio-blk-device,drive=cache,iothread=disk-iothread -
drive overlap-check=none,cache=unsafe,index=3,id=system,file=C:\Users\Adem\
.android\avd\Nexus_5_API_18.avd\system.img.qcow2,read-only -device virtio-b
lk-device,drive=system,iothread=disk-iothread -netdev user,id=mynet -device
 virtio-net-device,netdev=mynet -netdev user,id=mynet2,net=10.0.3.0/24 -dev
ice virtio-net-device,netdev=mynet2 -show-cursor -L ..\emulator/lib/pc-bios
 -append 'qemu=1 androidboot.hardware=ranchu keep_bootcon earlyprintk=ttyAM
A0 android.qemud=1 console=0 console=0 android.checkjni=1 qemu.gles=1 ndns=
2' -android-hw C:\Users\Adem\.android\avd\Nexus_5_API_18.avd/hardware-qemu.
ini
emulator: Starting QEMU main loop
emulator: registered 'boot-properties' qemud service
emulator: Adding boot property: 'qemu.sf.fake_camera' = 'none'
emulator: Initializing hardware OpenGLES emulation support
emulator: Adding boot property: 'ro.opengles.version' = '131072'
emulator: Adding boot property: 'dalvik.vm.heapsize' = '256m'
emulator: Adding boot property: 'ro.config.low_ram' = 'true'
emulator: Adding boot property: 'qemu.hw.mainkeys' = '0'
emulator: Adding boot property: 'qemu.adb.secure' = '1'
emulator: Adding boot property: 'qemu.sf.lcd_density' = '480'
emulator: goldfish_events.have-dpad: false
emulator: goldfish_events.have-trackball: false
emulator: goldfish_events.have-camera: false
emulator: goldfish_events.have-keyboard: true
emulator: goldfish_events.have-lidswitch: false
emulator: goldfish_events.have-touch: false
emulator: goldfish_events.have-multitouch: true
emulator: control console listening on port 5554, ADB on port 5555
Not using any http proxy
emulator: android_hw_fingerprint_init: fingerprint qemud listen service ini
tialized

emulator: onGuestSendCommand: [000000000c205c80] Adb connected, start proxi
ng data

1 个答案:

答案 0 :(得分:1)

我有类似的问题。请查看以下内容,了解它是否可以为您提供临时解决方法。

Android emulator not able to access the internet