Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio Profiler Memory Allocated N/A

Hi I am unable to view the allocated memory for my application when running the app on a real device/emulator, The profiler shows Allocated as N/A

below is the screenshot on how it looks,

enter image description here I am running android studio version 3.3.2, Is there anything else that needs to be configured.

like image 402
Ismail Iqbal Avatar asked Jun 02 '19 18:06

Ismail Iqbal


2 Answers

I had the same issue and here's what I did to make it work. (This is effective when running on API level < 26 only)

  1. In Android Studio, go to the Configurations menu as shown in the image below and click on Edit Configurations.

Edit Configurations menu

  1. Select your app configuration from the menu on the left (usually called "app").
  2. Click on the Profiling tab.
  3. Check "Enable advanced profiling".

Configurations Enable Advanced Profiling

like image 170
Menma Avatar answered Oct 01 '22 04:10

Menma


  1. Enable advanced profiling. (If this solves the problem ignore the rest.) Edit configurations > app > Profiling > tick "Enable advanced profiling"
  2. In Android Studio, open the profiler view by clicking the profiler button.
  3. At the top of the view pane, to the right of "Sessions" click the dropdown menu and select "Memory".
  4. To the right of the dropdown menu that now says "Memory" you will see "Allocation Tracking" and a dropdown menu next to it. Click it (while profiling!) and select "Full".

I hope this helped you.

enter image description here

EDIT: How my answer is better: It works on all Android devices!

like image 43
SnakeException Avatar answered Oct 01 '22 04:10

SnakeException