'installDebug' not found in root project 'android' React Native

Solution 1:

react-native run-android --variant [productFlavorName][debug/release]

e.g. react-native run-android --variant Huaweidebug

Solution 2:

For Debug test

react-native run-android --variant devKernelDebug

The reasons is because in the file android/build.gradle we have this

  productFlavors {
    devKernel {
      dimension 'remoteKernel'
    }
    prodKernel {
      dimension 'remoteKernel'
    }
  }