gpt4 book ai didi

react-native - 任务 ':react-native-firebase:compileDebugJavaWithJavac' 执行失败

转载 作者:行者123 更新时间:2023-12-03 16:38:26 29 4
gpt4 key购买 nike

在我的 React Native 0.60.4我正在尝试使用的应用程序react-native-firebase除了react-native-link,我什么都做了因为最新版本的 React Native 不支持它。当我发出命令 react-native-run-android ,它显示了react-native-firebase的节点模块的很多错误.我猜它正在发生某些版本冲突。这是长错误:

enter image description here

这是我的应用程序构建/gradle 文件依赖项:

dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.facebook.react:react-native:+"
implementation "com.google.firebase:firebase-core:16.0.9"
implementation "com.google.firebase:firebase-firestore:19.0.0"
implementation "com.google.firebase:firebase-messaging:18.0.0"
// implementation "com.google.firebase:firebase-functions: 17.0.0"
// implementation "com.google.firebase:firebase-analytics: 16.5.0"
// implementation " com.google.firebase:firebase-ads:17.2.1"
// implementation "com.google.android.gms:play-services-measurement-api:16.5.0"
// implementation "com.google.firebase:firebase-invites:17.0.0"
// implementation "com.google.firebase:firebase-iid: 18.0.0"
// implementation "com.google.firebase:firebase-config:17.0.0"
// implementation "com.google.firebase:firebase-perf:17.0.0"

// Firebase dependencies
implementation "com.google.android.gms:play-services-base:16.1.0"
implementation"com.google.android.gms:play-services-gcm:16.1.0"

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

if (enableHermes) {
def hermesPath = "../../node_modules/hermesvm/android/";
debugImplementation files(hermesPath + "hermes-debug.aar")
releaseImplementation files(hermesPath + "hermes-release.aar")
} else {
implementation jscFlavor
}
}

task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
apply plugin: 'com.google.gms.google-services'


还有我的 android build/gradle :

buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 21
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion = "28.0.0"
googlePlayServicesVersion = "16.1.0"
multiDexEnabled = true
}
repositories {
google()
jcenter()
}
dependencies {
classpath('com.android.tools.build:gradle:3.4.2')
classpath( 'com.google.gms:google-services:4.2.0')

}
}

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

}
}

最佳答案

运行 npx jetify

从 node_modules 所在的项目根目录

关于react-native - 任务 ':react-native-firebase:compileDebugJavaWithJavac' 执行失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57369178/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com