error Failed to install the app. Make sure you have the Android development environment set code example

Example 1: Failed to install the app. Make sure you have the Android development environment set up

"Failed to install the app"
"Make sure you have the Android development environment set up"
run below code in terminal =>
react-native start --reset-cache

Example 2: error Failed to install the app. Make sure you have the Android development environment set up

1 check if you have java-runtiume install 

2 check the missing sdk name and then install the sdk in android studios 
Config -> SDK manager -> android SDk (left menu) -> on right side in Tab menu SDK  tools


now check connnect devices

command==>>> adb devices


      List of devices attached
      emulator-5554 offline   # Google emulator
      14ed2fcc device         # Physical device
      
      
      
 now =====> run react-native run-android