1

我从( 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.
4

1 回答 1

4

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

// android/build.gradle

buildscript {
    ext {
        googlePlayServicesVersion = "+" // <- add this line
    }
于 2019-08-12T12:46:39.800 回答