【发布时间】:2021-08-07 18:53:07
【问题描述】:
我正在尝试在我的项目中实现 Tipsi-stripe,但在尝试手动链接所有依赖项后,我收到以下错误
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':tipsi-stripe:generateDebugRFile'.
> Could not resolve all files for configuration ':tipsi-stripe:debugCompileClasspath'.
> Could not find com.google.firebase:firebase-core:17.3.4.
Required by:
project :tipsi-stripe
这是我的 android/app/build.gradle
dependencies {
implementation 'com.google.firebase:firebase-core:17.3.4' //Added by Antek
implementation platform('com.google.firebase:firebase-bom:28.0.0') //Added by Antek
...
}
这是我的 android/build.gradle
buildscript {
ext {
buildToolsVersion = "29.0.3"
minSdkVersion = 21
compileSdkVersion = 30
targetSdkVersion = 30
// googlePlayServicesVersion = "16.1.0" // default: "+"
firebaseVersion = "17.3.4" // default: "+"
}
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
}
dependencies {
classpath("com.android.tools.build:gradle:4.1.0")
classpath 'com.google.gms:google-services:4.3.5'// <- Added this line
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google() //Added by Antek
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")
}
maven { url "https://jitpack.io" }
jcenter()
}
}
以下是我在 package.json 中的(与问题相关的)依赖项
"dependencies": {
...
"@react-native-firebase/app": "^11.4.1",
"@react-native-firebase/auth": "^11.4.1",
"@react-native-firebase/firestore": "^11.4.1",
"@react-native-firebase/messaging": "^11.4.1",
"tipsi-stripe": "^9.0.0"
}
如何解决此错误?我尝试用gradlew clean 清理gradlew,但到目前为止似乎没有任何效果:(
【问题讨论】:
标签: android firebase react-native stripe-payments react-native-firebase