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"  //修改的版本
}


这个是因为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"  //修改的版本
}

猜你喜欢

转载自blog.csdn.net/qq_21937107/article/details/80430479