簡體   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