升级后生成失败,原因为0.44 v

时间:2017-05-10 09:48:32

标签: android react-native compilation upgrade

我刚刚将本机版本恢复为0.44.0版本,我收到此错误:

['www.google.com', 'www.yahoo.com', 'www.youtube.com']

Android Studio的事件日志:

FAILURE: Build failed with an exception.

    What went wrong:
    Execution failed for task ':react-native-navigation:compileReleaseJavaWithJavac'.

    Compilation failed; see the compiler error output for details.

    Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

需要一些帮助!谢谢!

环境

Executing tasks: [:app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources, :react-native-navigation:generateDebugSources, :react-native-navigation:generateDebugAndroidTestSources, :react-native-navigation:mockableAndroidJar, :react-native-navigation:prepareDebugUnitTestDependencies, :realm:generateDebugSources, :realm:generateDebugAndroidTestSources, :realm:mockableAndroidJar, :realm:prepareDebugUnitTestDependencies]

编辑1:

这是我的pacakage.json

React Native Navigation version: 1.1.65
React Native version: 0.44.0
Platform(s) (iOS, Android, or both?): Android
Device info (Simulator/Device? OS version? Debug/Release?): AVD from Android Studio (6.0 API 23) and tested with a second AVD (7.1.1 API 25) => got same build failed

编辑2:

我终于将build.gradle应用程序从23更新为25 compileSdkVersion,并将buildToolsVersion更新为' 25.0.2'来自' 23.x.x'。

{
  "name": "App",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },
  "dependencies": {
    "react": "^15.5.4",
    "react-native": "^0.44.0",
    "react-native-checkbox": "^1.1.0",
    "react-native-navigation": "^1.1.65",
    "realm": "^1.2.0",
    "redux": "^3.6.0"
  },
  "devDependencies": {
    "babel-jest": "19.0.0",
    "babel-preset-react-native": "1.9.1",
    "jest": "19.0.2",
    "react-test-renderer": "~15.4.1"
  },
  "jest": {
    "preset": "react-native"
  }
}

它已编译,我现在可以再次运行我的应用程序。

1 个答案:

答案 0 :(得分:0)

使用自动安装解决了我的pb