【问题标题】:Execution failed for task ':tipsi-stripe:generateDebugRFile' Could not find com.google.firebase:firebase-core:17.3.4任务':tipsi-stripe:generateDebugRFile'执行失败找不到com.google.firebase:firebase-core:17.3.4
【发布时间】: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


    【解决方案1】:

    你可能没有看到这个消息,但是 Stripe 最近刚刚发布了他们自己的 React Native SDK stripe-react-native (github),目前处于公测阶段。

    我强烈建议您查看该软件包和相关指南(例如,accept-a-payment),然后将您的集成工作转向那个方向。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-03-07
      • 2018-12-23
      • 2023-03-15
      • 1970-01-01
      • 1970-01-01
      • 2014-10-25
      • 2018-08-20
      相关资源
      最近更新 更多