确保Android Studio版本不低于3.2,测试机建议Android 8.0+。
1 用profile启动APP(最好时debug版本)
路径 Android Studio --> Run --> Profile
2 选择测试APK
Profile --> 点击左上角“+” ......
3 Live Allocation选择JNI heap
参考文档
https://developer.android.google.cn/studio/profile/memory-profiler