react-native 启动服务器时候报错Could not install the app on the device, read the error above for details.

时间:2024-03-13 19:12:01

react-native 启动服务器时候报错Could not install the app on the device, read the error above for details.


这个是因为react-native版本升级了,但是在项目的build.gradle没有改成升级的版本号

一般修改以下两个地方:

1.  android/build.gradle

  dependencies {
    classpath 'com.android.tools.build:gradle:1.2.3'  //修改的版本
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
  }
2.android/app/build.gradle

  android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"  //修改的版本
}