0

I have created a xamarin forms application and started the debug process from Visual studio.

I would like to be able to use the "Android Monitor" tools in android studio I.E.

  • Memory
  • CPU
  • Network
  • GPU

But i cannot see my app in the drop down e.g. my.app.android

enter image description here

Is what I am trying to do possible? I feel it should be. I have tried all the suggestions on this thread and others but with no success. Currently if I select one of the items in the drop down I some data from memory, CPU etc, but that's obviously not to helpful as i'm not getting any specifics about my app.

I can successfully view data about my device by using "Android Device Monitor", but I feel like i'm missing out on some vital information not having "Android Monitor" tools

Zoe
  • 27,060
  • 21
  • 118
  • 148
tony09uk
  • 2,841
  • 9
  • 45
  • 71
  • Not sure if this is the issue but I have noticed that Instant Run causes this kind of issues, try disabling Instant Run - uninstall and install/run again. – HB. Oct 05 '17 at 17:14
  • This is probably a really stupid question, do you mean first try and disable instant run and if that doesn't work try uninstall android studio? – tony09uk Oct 05 '17 at 17:26
  • 1
    No what I meant is to disable instant run then uninstall the application from the emulator/device then installing the application again. – HB. Oct 05 '17 at 17:28
  • try to force "debuggable true" in your build.gradle... just to see if you have a different result – guipivoto Oct 05 '17 at 18:13
  • 1
    @H.Brooks that worked perfectly for everything except GPU, is there something that could be stopping that? put your comment as the answer and I will accept it – tony09uk Oct 06 '17 at 08:41
  • check https://stackoverflow.com/a/35169716/2826147 – Amit Vaghela Oct 06 '17 at 08:57
  • 1
    @AmitVaghela Like he said, he already turned off instant run (this fixed his issue) and I have already posted a answer on how to do it for future readers and I also posted how to fix the GPU issue. – HB. Oct 06 '17 at 09:02

1 Answers1

2

I have noticed that Instant Run causes this kind of issues. Try turning off instant run:

Mac - Android Studio > Preferences > Build, execution, deploy > Instant Run.

Windows - File > Setting

In regards to the GPU issue, the documentation states the following:

To enable GPU monitoring, make sure you turn on monitoring for your Android hardware device or emulator under Setting → Developer Options → Profile GPU rendering → In adb shell dumpsys gfxinfo

One you enabled GPU rendering in adb shell dumpsys gfxinfo, you have to untoggle the pause icon in Android Studio (on the left of the graph) for the GPU profiling to start for the selected app.

Hope this helps.

Zoe
  • 27,060
  • 21
  • 118
  • 148
HB.
  • 4,116
  • 4
  • 29
  • 53