On Android 4.1 and lower, the Developer options screen is available by default. On Android 4.2 and higher, you must enable this screen.
On your device, find the Build number option. The following table shows the settings location of the Build number on various devices:
Tap the Build Number option seven times until you see the message You are now a developer! This enables developer options on your device.
Return to the previous screen to find Developer options at the bottom.
At the top of the Developer options screen, you can toggle the options on and off. Keep this on. When off, most options are disabled except those that don't require communication between the device and your development computer.
Before you can use the debugger and other tools, you need to enable USB debugging, which allows Android Studio and other SDK tools to recognize your device when connected via USB.
Enable USB debugging in the device system settings under Developer options. You can find this option in one of the following locations, depending on your Android version:
Android 9 (API level 28) and higher: Settings > System > Advanced > Developer Options > USB debugging
Android 8.0.0 (API level 26) and Android 8.1.0 (API level 27): Settings > System > Developer Options > USB debugging
Android 7.1 (API level 25) and lower: Settings > Developer Options > USB debugging