How can I speed up deployment to the android emulator?

匆匆过客 提交于 2019-12-03 09:03:17

Not sure if that's an emulator issue, or just your apk is too heavy, but I'd recommend trying Genymotion just in case, generally is fast as hell compared with the default one.

Nafscript

Maybe this page will help: https://developer.android.com/tools/devices/emulator.html

In order to make the Android emulator run faster and be more responsive, you can configure it to take advantage of hardware acceleration, using a combination of configuration options, specific Android system images and hardware drivers.

jackguinea

Maximizing avd speed: General Solution

This is how I made my emulator lightning fast. I have an intel core i7 processor and 16gb of ram on my Lenovo Thinkpad t430.


IGNORE STEP 1 if YOU HAVE AN AMD CPU.

Step 1: If you haven't already, install intel haxm for windows 8.1. Google how to do this, there is no point in me going into this in detail because it is already well documented. Make sure that haxm is working when you run the emulator. Installing haxm increased the speed of my AVD by 12 times. (I allocated 10gb of ram to haxm when installing)

Step 2: Make sure your computer's power settings are set to MAXIMUM PERFORMANCE. This is very important and can double the speed of your AVD.

Step 3: Go into your task manager and end all unnecessary PROCESSES. i.e. ITunes Helper. Close all programs besides eclipse as well.

Step 4: Run your emulator while you have task manager open to PROCESSES. You should see "emulator" in the description. Right click on "emulator" and set Priority to High. You can also right click on eclipse and set its priority to High as well.

Step 5: In the task manager, right click on emulator and click on "affinity" to "all processors"

Done! Your AVD is now lightning fast.

Some ideas that worked for me :

-Enable Instant Run Open the Settings or Preferences dialog. Navigate to Build, Execution, Deployment > Instant Run.

-Enable offline mode Build, Execution, Deployment > Gradle. Check the Offline work checkbox.

-Enable configuration on demand Build, Execution, Deployment > Compiler. Check the Configure on demand checkbox.

-Create library modules -Convert images to WebP https://developers.google.com/speed/webp/ -Disable PNG crunching

See more https://developer.android.com/studio/build/optimize-your-build

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!