How to record screen with Android Studio
Solution 1
Maybe your device does not support the screen recorder, there are many devices which does not support screen recorder thus this is device issue. If you want to record your app screen then simply run the app on android emulator or on genymotion and start your desktop screen recorder and adjust the desktop screen to fit emulator. There are many screen recorder for PC but i prefer cam studio 8. Thanks
Solution 2
Now you can also record video from Android emulator to follow below option:
Check below screenshot:
Solution 3
Go to your menu
-
View
->Tool Windows
->Android
You will find the record icon at the bottom left corner.
If you are using an AVD, make sure "Use host GPU" is disabled.
To take a video recording of your app:
- Start your app as described in Run your App in Debug Mode.
- Click Android to open the Android DDMS tool window.
- Click Screen Record on the left side of the Android DDMS tool window.
- Click Start Recording.
- Interact with your app.
- Click Stop Recording.
- Enter a file name for the recording and click OK.
Source: https://developer.android.com/tools/debugging/ddms.html
Solution 4
In newer versions of Android Studio
it requires an external Android phone to record screen from preferably with a resolution of at least 720p
. Since the internal runs on the virtual memory it can't be recorded and is therefore disabled as it can't both record and run emulator at same time.
I'm running Android Studio 2.3.2
which is the latest and the one I experienced this on. But when I closed the emulator and connected my HTC One M9
it automatically enabled recording button to record the phone instead of the emulated device.
Check the images below and the difference between them in the red circles:
First image, emulated device on the computer:
Second image, personal device connected to computer:
Solution 5
You can record videos from the command line into an .mp4 file:
adb shell screenrecord /sdcard/video.mp4
When you are done recording, press Ctrl+C.
Then you can copy the file to your computer (current folder)
adb pull /sdcard/video.mp4
If you want you can delete the file from the sdcard
adb shell rm /sdcard/video.mp4
harsh
Updated on July 08, 2022Comments
-
harsh almost 2 years
I connect my phone to Android Studio and code. I want to record my phone screen. I saw this but that button is disabled in my Android Studio. I can capture screens but can't record. Can someone help me with this?
UPDATE
This is how it is there in my Android studio. The button is disabled
-
Paul over 8 years"You will find the record icon". Yes, I found it, but it is inactive.
-
Machado over 8 yearsHave you tried debugging with another device? There any many devices that doesn't support screen recording after all.
-
IgorGanapolsky over 8 yearsYou are assuming that record button is present for Emulator launches.
-
Machado over 8 years> If you are using an AVD, make sure "Use host GPU" is disabled.
-
Admin over 8 yearsHow to enable circle where user clicked on screen?
-
ssimm over 8 yearsFor a Genymotion API 16 (Samsung Galaxy S2) the button was disabled for me. But for an API 19 emulator (Google Nexus 4) the button is enabled.
-
ssimm over 8 yearsFor example... I use Genymotion and on once API16 devide the video recording button was disabled and on another one (API 19) is was enabled.
-
Machado over 8 yearsI'm not sure if it is somehow linked with the API. But yes, there are devices that doesn't support screen recording.
-
aProperFox almost 8 yearsTo my understanding, "Use host GPU" is no longer a setting for creating an AVD and now you must either choose a Graphics emulated performance dropdown option of "Hardware" or "Software". In this case, "Software" should let you screen record but it runs super slow.
-
Ove Stoerholt over 7 yearsSometimes it also helps to restart Android Studio.
-
Hakanai over 7 yearsI don't have to clip Stop Recording, because it gets immediately automatically clicked by the application, and I get an empty file for my video.
-
Machado over 7 years@Trejkaz what's your device and your Studio version?
-
Hakanai over 7 years@Machado Huawei Watch, Android Studio 2.2.3, but was happening on the previous version I had installed from a whole year earlier too.
-
Daniel Reina over 7 yearsFor those of you who have the icon disabled/inactive, try by debugging your app first, not just running it. The debugging icon is shown in my answer here: stackoverflow.com/a/37205692/5452969
-
Nahid about 7 yearsHow do I disable "Use host GPU" ?
-
arekolek about 7 yearsTo add to this answer, Prerequisites to Android Monitor say that the Video Capture tool works with a hardware device only, not the emulator.
-
RobinM over 6 yearshaha.. so simple! I ran into this issue as I was developing with 2 devices both were the same brand and similar version. When I selected the correct one suddenly the button was no longer disabled.. sigh! yep, face + palm moment :)
-
Maximilien Belinga about 6 yearsPlease can you show me how you setup that AVD. Basically all the AVD I launch doesn't have such feature. Maybe you do something special. Thanks again, I'll upvote, just in case.
-
Anbuselvan Rocky almost 3 yearsDoing this will show everything, (mouse cursor, which I don't want to see it in my record.)
-
Abed over 2 yearscan't record audio in this method