【问题标题】:Android Google Maps don't work安卓谷歌地图不工作
【发布时间】:2016-12-04 18:34:18
【问题描述】:

我正在尝试使用 Google 地图制作简单的应用程序。但是当我在模拟器中运行应用程序时,地图不会显示,只显示以下文本:“[应用程序名称] 不会运行,除非您更新 Google Play 服务”。我使用 Nougat 7.1(使用 Google API)安装了模拟器 Nexus 5。我在谷歌上没有找到解决方案。我可以在模拟器上运行 Google 地图应用程序还是必须在真机上进行测试?

更新:在 build.gradle 中:

apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.1"
defaultConfig {
    applicationId "com.malikbisic.mapsdemo"
    minSdkVersion 21
    targetSdkVersion 25
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.0.1'
compile 'com.google.android.gms:play-services:10.0.1'
testCompile 'junit:junit:4.12'
}

【问题讨论】:

    标签: google-play-services


    【解决方案1】:

    好吧,您可以使用模拟器运行它,但请确保您的 android 模拟器使用运行基于 Android 4.2.2 或更高版本的 Google API 平台的AVD

    查看threadvideo,了解如何设置和使用安卓模拟器来运行 Google 地图。

    【讨论】:

      猜你喜欢
      • 2021-06-27
      • 2014-02-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多