I'm using Android Studio and I was wondering if there is a way to see what file/script is executed when I press a button in the Virtual Phone. Is it even possible?
I have a big project I did a long time ago and don't remember in what file the code is written. I need to find a way to show in what directory is located.
Example: Press Search Button - Show directory where that action is located. "app/src/search/search-bar.java"
For that, you must have to go through AndroidManifest.xml file to check which Activity is launcher Activity .
Then go in the source file(.java) of launcher Activity, from there you can find a way to check where it will go by discovering any Intent .
The best way is to debug your project by putting breakpoints.
您应该能够在屏幕底部的日志栏中看到此类信息。
You can make use of Android Profiler
available in Android Studio 3.0
or higher. You can access it from View > Tool Windows > Android Profiler .
This will give you all the required information, You can see the Activities name which is running in the mobile. You can even track your CPU, Memory and network usages with this tool.
Read more about Android Profiler here
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.