为什么在Windows 7,奔腾n3540上运行Android应用程序这么慢?

时间:2017-02-27 10:38:32

标签: performance android-studio android-emulator

我安装了android studio 2.2并创建了模拟器nexus 4.

我的模拟器的详细信息是:

Name: Nexus_4_API_23

CPU/ABI: Google APIs Intel Atom (x86_64)

Path: D:\Programs\Android\.android\avd\Nexus_4_API_23.avd

Target: google_apis [Google APIs] (API level 23)

Skin: nexus_4

SD Card: D:\Programs\Android\.android\avd\Nexus_4_API_23.avd\sdcard.img

hw.dPad: no

runtime.network.speed: full

hw.accelerometer: yes

hw.device.name: Nexus 4

vm.heapSize: 64

skin.dynamic: yes

hw.device.manufacturer: Google

hw.gps: yes

hw.initialOrientation: Portrait

image.androidVersion.api: 23

hw.audioInput: yes

image.sysdir.1: system-images\android-23\google_apis\x86_64\

tag.id: google_apis

showDeviceFrame: yes

hw.camera.back: emulated

hw.mainKeys: no

AvdId: Nexus_4_API_23

hw.camera.front: emulated

hw.lcd.density: 320

avd.ini.displayname: Nexus 4 API 23

hw.gpu.mode: auto

hw.device.hash2: MD5:6930e145748b87e87d3f40cabd140a41

hw.ramSize: 512

hw.trackBall: no

hw.battery: yes

hw.cpu.ncore: 2

hw.sdCard: yes

tag.display: Google APIs

runtime.network.latency: none

hw.keyboard: yes

hw.sensors.proximity: yes

disk.dataPartition.size: 800M

hw.sensors.orientation: yes

avd.ini.encoding: UTF-8

hw.gpu.enabled: yes

当我运行简单的应用程序时,它会进行gradle重建并在模拟器上启动它。即使打开模拟器,每次运行它也需要2分钟左右。

在控制台中,运行以这些消息结束:

D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
I/OpenGLRenderer: Initialized EGL, version 1.4
D/gralloc_ranchu: Emulator without host-side GPU emulation detected.

Haxm已安装并正常运行。英特尔虚拟化技术已在BIOS中启用。

我的模拟器选项有什么问题? 为什么我的android工作室这么慢?

2 个答案:

答案 0 :(得分:1)

解决了它。在android studio中转到it('calls API and then verifies database contents', co.wrap(function*() { var input = { id: 'foo', number: 123, }; yield request .post('/foo') .send(input) .expect(201) .expect({ id: input.id, number: input.number, }); // Now check that database contents are correct var dbFoo = yield foos.findOne({ id: input.id, }); expect(dbFoo).to.have.property('id').to.equal(input.id); expect(dbFoo).to.have.property('number').to.equal(input.number); }));

单击虚拟设备的Tools>Android>AVD Manager按钮

接下来,找到edit选项,然后选择Graphics

现在,当模拟器打开时运行app非常快。

在控制台中没有消息:Hardware - GLES 2.0

我发现的最好的Android教程是https://www.udacity.com/course/new-android-fundamentals--ud851https://www.udacity.com/courses/android

有更多免费的Android教程

答案 1 :(得分:0)

有关最佳表现的两条建议:

  1. 安装英特尔HAXM:

    https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager

  2. 启用主机GPU:

    enter image description here