【发布时间】:2019-11-28 21:41:37
【问题描述】:
我是 Ionic 2/Firebase 和 Android 的新手。
我从 Firebase 控制台获取了配置变量并将其添加到我的 app.module.ts 中。在网络上一切正常。
我按照说明在 android 上运行我的应用程序,但由于 Ionic2 具有不同的文件结构,我不知道应该在哪里添加 classpath 'com.google.gms:google-services:3.0.0' 和 apply plugin: 'com.google.gms.google-services'。
我收到此错误
找不到方法 classpath()
当我尝试将它们添加到以下路径时:
"C:\myapp\platforms\android\build.gradle" 类路径 'com.google.gms:google-services:3.0.0'
"C:\myapp\platforms\android\CordovaLib\build.gradle" 应用插件: 'com.google.gms.google-services'
任何人都可以帮我配置我的应用程序,以便它可以在 android 和 iOS 上运行吗?
【问题讨论】:
-
那些进入单个 Gradle 文件。你是否有一个?如果有,请全部出示
-
你用的是哪个插件?
标签: android google-play-services ionic2