每当我在使用Google地图API的模拟器中运行我的应用程序时,都会出现错误“除非更新Google Play服务,否则应用程序无法运行”。我已经在Stack Overflow上搜索了一些关于相同主题的其他问题,因为有很多,但我还没有找到解决方案。那么我该如何在模拟器上让Google地图API工作呢?
当我在模拟器上查看已安装的应用程序时,我没有在列表中看到Google Play服务。所以我猜这就是问题所在?如果是这样,我该如何在设备上安装它?或者在模拟器上根本不可能使用Google Play服务吗?
我正在使用启用了Google API的模拟器。
以下是我的Gradle构建文件:
当我在模拟器上查看已安装的应用程序时,我没有在列表中看到Google Play服务。所以我猜这就是问题所在?如果是这样,我该如何在设备上安装它?或者在模拟器上根本不可能使用Google Play服务吗?
我正在使用启用了Google API的模拟器。
以下是我的Gradle构建文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.example.thomas.app"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
mavenCentral()
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.facebook.android:facebook-android-sdk:4.6.0'
compile 'com.android.support:support-v4:23.0.1'
compile 'com.google.android.gms:play-services:8.1.0'
compile 'com.android.support:design:23.0.1'
}
compile 'com.google.android.gms:play-services:8.1.0'
,它是Google Play Services
。 - Lawrence Choy