Wrong version of Flow,Execution failed for task ':app:installDebug'. > com.android.builder.testing.a

  1. Launching Flow server for /Users/RNProjects/XxxProjects
    Wrong version of Flow. The config specifies version ^0.35.0 but this is version 0.42.0
    意思是说当前flowconfig的版本为^0.35.0 但是现在的版本为0.42.0,一般Wrong version of Flow 只需要 运行 brew upgrade flow 命令 进行更新就可以,但这里明显是配置的版本过低,所以需要手动修改一下就可以了。
    解决方法:
    在命令行 cd 到当前工程下,运行open .flowconfig 拉到最下面,改成当前版本就可以了。
    Wrong version of Flow,Execution failed for task ':app:installDebug'. > com.android.builder.testing.a_第1张图片

  2. Execution failed for task ‘:app:installDebug’.>com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: Failed to install all
    3.运行 react-native run-android 的时候报错,网上有人说权限问题之类的,试了下,未果。我就跟了一下,发现是因为gradle的问题。
    解决方法:

    1. 先修改android 下wrapper的gradle-wrapper.properties配置文件,distributionUrl=https://services.gradle.org/distributions/gradle-3.3-all.zip
    2. app下面的build.gradle 文件:buildToolsVersion "25.0.0"
    3. android 工程下的build.gradle 文件:
      dependencies {
      classpath 'com.android.tools.build:gradle:2.3.0'
      }

      然后重新跑工程,运行 react-native run-android 就可以了

你可能感兴趣的:(常见问题解决)