首页 > 解决方案 > react-native-firebase:compileDebugRenderscript 失败

问题描述

我想将我的 react 本机应用程序连接到我的设备模拟器中。

当我使用以下命令运行我的应用程序时:react-native run-android

我遇到了这个问题: react-native-firebase:compileDebugRenderscript FAILED

  1. 应用程序/build.gradle

     dependencies {
     //compile ("com.facebook.react:react-native:0.56.0") { force = true }
     compile project(':react-native-google-signin')
     compile project(':react-native-firebase')
     implementation fileTree(include: ['*.jar'], dir: 'libs')
     implementation 'com.facebook.react:react-native:0.56.0'
     // From node_modules
     implementation project(':react-native-navigation')
     compile project(':react-native-vector-icons')
     compile project(':react-native-image-picker')
     implementation project(':rn-fetch-blob')
     compile project(':react-native-document-picker')
     compile project(':react-native-get-real-path')
     compile project(':react-native-fs')
     compile project(':react-native-add-calendar-event')
     implementation "com.google.android.gms:play-services-base:15.0.1"
     implementation "com.google.firebase:firebase-core:16.0.3"
     implementation "com.google.firebase:firebase-messaging:17.3.3"
    

    }

2- 安卓/build.gradle

dependencies {
    classpath 'com.android.tools.build:gradle:3.3.0'
    classpath 'com.google.gms:google-services:4.0.1'
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

allprojects {
repositories {
   google()
   mavenCentral()
    mavenLocal()
    jcenter()
    maven {
        // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
        url "$rootDir/../node_modules/react-native/android"
    }
    maven { url 'https://jitpack.io' }
}

}

请注意,在 StackOverflow 上发帖是我最后的选择。

标签: androidreact-native

解决方案


推荐阅读