【发布时间】:2018-06-24 17:53:12
【问题描述】:
所以我创建了一个谷歌地图活动并且它正在工作。连接 Firebase 后一切都停止了。我不确定在这里发布什么,但下面是我的 build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example.tagpi.prototypev3"
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.firebase:firebase-core:16.0.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
apply plugin: 'com.google.gms.google-services'
你们能教我如何解决这个问题吗?我刚刚开始学习如何创建移动应用。
谢谢,
特工史密斯
【问题讨论】:
-
尝试将
play-services-maps更改为16.0.1,反之亦然。 -
@ישואוהבאותך 我尝试更改它并收到此错误“无法解决:com.google.android.gms:play-services-maps:16.0.1”。这个 play-services-maps 是创建新地图活动时的默认配置
-
@JaydipKalkani 我会检查你的链接。感谢您的参考顺便说一句
-
@JaydipKalkani 我已经检查了您提供的链接。 Android Studio 和 SDK 管理器均已更新。奇怪的是,在我连接 Firebase 之前,一切正常。我从一个默认的 Map Activity 开始并将其连接到谷歌。我已经对其进行了测试,它可以正常工作。但是使用firebase助手连接数据库后,一切都不再起作用了。
标签: android android-studio android-gradle-plugin