繁体   English   中英

任务:react-native-camera:compileGeneralDebugJavaWithJavac FAILED

[英]Task :react-native-camera:compileGeneralDebugJavaWithJavac FAILED

我的 APP 运行良好,但是当我尝试新安装时,它显示错误 - Task:react-native-camera:compileGeneralDebugJavaWithJavac FAILED。 下面的代码可能会帮助您解决这个问题。 我的package.json如下所示:

{
  "name": "app name",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },
  "dependencies": {
    "@react-native-community/async-storage": "^1.7.1",
    "axios": "^0.18.1",
    "native-base": "^2.13.12",
    "react": "16.8.3",
    "react-native": "^0.62.2",
    "react-native-animatable": "^1.3.2",
    "react-native-camera": "^2.11.0",
    "react-native-modalbox": "^1.7.1",
    "react-native-qrcode-scanner": "^1.2.1",
    "react-native-search-filter": "^0.1.4",
    "react-native-vector-icons": "^6.5.0",
    "react-native-webview": "5.8.1",
    "react-navigation": "^2.18.3",
    "url": "^0.11.0"
  },
  "devDependencies": {
    "@babel/core": "7.4.5",
    "@babel/runtime": "7.4.5",
    "babel-jest": "^26.0.1",
    "jest": "^26.0.1",
    "metro-react-native-babel-preset": "^0.54.1",
    "react-native-dotenv": "^0.2.0",
    "react-test-renderer": "16.8.3"
  },
  "jest": {
    "preset": "react-native"
  },
  "rnpm": {
    "assets": [
      "./assets/fonts/"
    ]
  }
}

安卓/build.gradle

buildscript {
    ext {
        buildToolsVersion = "28.0.3"
        minSdkVersion = 16
        compileSdkVersion = 28
        targetSdkVersion = 28
        supportLibVersion = "28.0.0"
    }
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath("com.android.tools.build:gradle:3.4.0")
    }
}

allprojects {
    repositories {
        mavenLocal()
        google()
        jcenter()
        maven {
            url "$rootDir/../node_modules/react-native/android"
        }
    }
}

我对这个错误一无所知。 有什么帮助???

我认为你有一些链接问题。

我刚刚遇到同样的问题并在 React-Native v0.6 上解决了,这是我的解决方案:

  1. 只需遵循本教程
  2. 执行这个`react-native run-android --no-jetifier

`

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM