【问题标题】:Failed to build the app after I installed react-native-push-notification安装 react-native-push-notification 后无法构建应用程序
【发布时间】:2019-08-12 10:55:39
【问题描述】:

我从 (React Native Push Notifications) 安装了 react-native-push-notification,但无法在 android 上运行该应用程序。我没有在IOS上测试

* Where:
Build file 'C:\Users\Zarzu Victor\payAssistant\node_modules\react-native-push-notification\android\build.gradle' line: 47

* What went wrong:
A problem occurred evaluating project ':react-native-push-notification'.
> Could not get unknown property 'DEFAULT_GOOGLE_PLAY_SERVICES_VERSION' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

【问题讨论】:

    标签: react-native react-native-push-notification


    【解决方案1】:

    从今天开始,我也面临这个问题。我发现android/build.gradle 中缺少googlePlayServicesVersion。在下面添加了一行,它解决了库的问题。

    // android/build.gradle
    
    buildscript {
        ext {
            googlePlayServicesVersion = "+" // <- add this line
        }
    

    【讨论】:

    • 谢谢。我会试试的
    • 另一个问题。你知道如何升级到 Google Play Developer API 3.0 吗?
    • 它不见了,但为什么需要它?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-02-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多