一、error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
解决方法之一:
把Android项目中local.properties
文件拷贝到RN项目Android文件夹中
二、编译安装命令
npx react-native run-android
三、Program type already present: android.support.v4.os.ResultReceiver$MyResultReceiver
在gradle.properties中加入下面代码即可:
-
android.useAndroidX=true
-
android.enableJetifier=true