安装 react-native-push-notification 后无法构建应用程序
Failed to build the app after I installed react-native-push-notification
我从 (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.
我也遇到了这个问题,从今天开始。我发现 android/build.gradle
中缺少 googlePlayServicesVersion
。在下面添加了一行,它解决了库的问题。
// android/build.gradle
buildscript {
ext {
googlePlayServicesVersion = "+" // <- add this line
}
我从 (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.
我也遇到了这个问题,从今天开始。我发现 android/build.gradle
中缺少 googlePlayServicesVersion
。在下面添加了一行,它解决了库的问题。
// android/build.gradle
buildscript {
ext {
googlePlayServicesVersion = "+" // <- add this line
}