问题
I notice that when running Espresso UI tests on an emulated device my system's memory usage increases indefinitely until I restart Android Studio and my emulated device.
On inspection I can see that my Android Studio and emulated device memory usage remain constant, yet overall memory usage increases. However I cannot see where the additional memory is assigned in my system monitor.
This happens even when running empty tests on a blank activity! Please see code attached
I am running Android Studio 2.2.3 on Ubuntu 16.04. The emulated device I use is Android 7.0 API 24 running on Nexus 5, 1Gb RAM, started in terminal using AVD. The test class I'm running contains Espresso UI tests.
来源:https://stackoverflow.com/questions/45314878/android-studio-excessive-memory-usage-when-running-espresso-ui-tests