任务 :react-native-image-filter-kit:compileDebugRenderscript FAILED

时间:2021-03-11 08:34:44

标签: android reactjs react-native android-studio react-native-android

当我运行这个 npx react-native run-android 我得到了这个

任务 :react-native-image-filter-kit:compileDebugRenderscript FAILED

我已按照此链接遵循所有安装说明 https://github.com/iyegoroff/react-native-image-filter-kit

配置 操作系统

Ubuntu 18.04.5 LTS-64 位

纱线 -> 1.22.5

节点-> v14.16.0

npm ->6.14.11

react-native-> 0.63.4

react-native-image-filter-kit": "^0.7.3

准备好在需要时提供更多配置细节

在 Android Studio 的 Virtual Device Pixel 4 XL API 29 Android 10 && 上试过 在我的设备上三星 Galaxy S7

两者都没有运行

再次尝试在我的项目中安装包

用 #31 尝试了这个解决方案 通过改变 android/app/build.gradle && android/build.gradle && gradle.wrapper.properties

我是 React-Native 和 Android 应用程序的新手。 任何提示或帮助都会对我非常感激。

android/build.gradle



// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext {
         buildToolsVersion = "29.0.3"
        minSdkVersion = 17
        compileSdkVersion = 29
        targetSdkVersion = 29
        renderscriptVersion = 21
        supportLibVersion = '1.0.2'
        mediaCompatVersion = '1.0.1'
        supportV4Version = '1.0.0'
    }
    repositories {
        google()
        jcenter()
    }
     dependencies {
        classpath("com.android.tools.build:gradle:3.6.0")
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }

}

allprojects {
    repositories {
        mavenLocal()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url("$rootDir/../node_modules/react-native/android")
        }
        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }

        google()
        jcenter()

        maven { url 'https://maven.google.com' } // ADD THIS

        maven { url 'https://www.jitpack.io' }
    }
}

android/app/build.gradle

android {
    compileSdkVersion rootProject.ext.compileSdkVersion
    buildToolsVersion rootProject.ext.buildToolsVersion

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

.
.
.
 defaultConfig {
        applicationId "com.shakendate.shakendate"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode 17
        versionName "1.0"
        renderscriptTargetApi rootProject.ext.renderscriptVersion
        renderscriptSupportModeEnabled true
        vectorDrawables.useSupportLibrary = true
        multiDexEnabled true
    }
.
.
.
dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    //noinspection GradleDynamicVersion
    implementation "com.facebook.react:react-native:+"  // From node_modules

    implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"

    implementation 'com.android.support:multidex:1.0.3'

    implementation project(':react-native-linear-gradient')

    implementation project(':react-native-splash-screen')

    implementation project(':react-native-svg')

    debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.fbjni'
    }

    debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.flipper'
        exclude group:'com.squareup.okhttp3', module:'okhttp'
    }

    debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.flipper'
    }

package.json

"dependencies": {
        "@react-native-async-storage/async-storage": "^1.13.2",
        "@react-native-community/cameraroll": "^4.0.1",
        "@react-native-community/masked-view": "^0.1.10",
        "@react-native-community/slider": "^3.0.3",
        "@react-native-picker/picker": "^1.9.4",
        "@react-navigation/bottom-tabs": "^5.11.2",
        "@react-navigation/native": "^5.8.10",
        "@react-navigation/stack": "^5.12.8",
        "axios": "^0.21.0",
        "moment": "^2.29.1",
        "react": "16.13.1",
        "react-native": "0.63.4",
        "react-native-actions-sheet": "^0.3.5",
        "react-native-actionsheet": "^2.4.2",
        "react-native-calendars": "^1.846.0",
        "react-native-countdown-circle-timer": "^2.3.10",
        "react-native-device-info": "^7.3.1",
        "react-native-geolocation-service": "^5.1.1",
        "react-native-gesture-handler": "^1.9.0",
        "react-native-iap": "^5.2.3",
        "react-native-image-crop-picker": "^0.35.1",
        "react-native-image-filter-kit": "^0.7.3",
        "react-native-keyboard-aware-scroll-view": "^0.9.3",
        "react-native-linear-gradient": "^2.5.6",
        "react-native-picker-select": "^8.0.4",
        "react-native-reanimated": "^1.13.2",
        "react-native-safe-area-context": "^3.1.9",
        "react-native-screens": "^2.16.1",
        "react-native-shake": "^3.5.0",
        "react-native-share": "^5.1.0",
        "react-native-simple-toast": "^1.1.3",
        "react-native-snap-carousel": "^3.9.1",
        "react-native-splash-screen": "^3.2.0",
        "react-native-svg": "^12.1.0",
        "react-native-view-shot": "^3.1.2",
        "react-native-webview": "^11.0.2",
        "react-navigation": "^4.4.3",
        "react-redux": "^7.2.2",
        "redux": "^4.0.5",
        "redux-thunk": "^2.3.0"
    },
    "devDependencies": {
        "@babel/core": "^7.8.4",
        "@babel/runtime": "^7.8.4",
        "@react-native-community/eslint-config": "^1.1.0",
        "babel-jest": "^25.1.0",
        "eslint": "^6.5.1",
        "husky": "^4.3.5",
        "jest": "^25.1.0",
        "lint-staged": "^10.5.3",
        "metro-react-native-babel-preset": "^0.59.0",
        "prettier": "^2.2.1",
        "react-test-renderer": "16.13.1"
    },

1 个答案:

答案 0 :(得分:0)

我安装这个包后解决了

对于 32 位二进制文​​件:sudo apt-get install libncurses5:i386

对于 64 位二进制文​​件: sudo apt-get install libncurses5

还可以使用此命令安装库集合,

sudo apt-get install ia32-libs