我正在构建一个使用谷歌地图api的应用程序。应用程序的第一个活动是地图活动,它根据我在标题中声明的错误拒绝运行。
我已经大量修改了我的build.gradle试图修复问题;基于我在本网站上找到的其他解决方案。
但我想我可能会变得更糟:这就是我的build.gradle看起来像:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.navigation.dixongardens.ben.bensgardens"
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:28.0.0-alpha1'
compile 'com.google.android.gms:play-services-maps:11.6.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
// androidTestImplementation 'com.android.support.test:runner:1.0.1'
// androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
compile 'com.google.maps.android:android-maps-utils:+'
compile 'com.google.android.gms:play-services:11.8.+'
compile 'com.android.support:design:26.0.0-alpha1'
}
有人可以帮我指导我的build.gradle有什么问题吗?我很困惑谷歌服务正常工作需要哪些依赖项。