【发布时间】:2017-10-03 19:20:27
【问题描述】:
我有一个在我的 Activity 中动态显示的 MapFragment。
但它说我必须更新 Google Play 服务。我已经通过更新依赖项来做到这一点,但它不起作用。
有什么想法吗?
这是我的 Gradle 文件:
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
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.1.0'
compile 'com.android.support:design:25.1.0'
compile 'com.google.android.gms:play-services-maps:10.2.0'
compile 'com.android.volley:volley:1.0.0'
compile 'com.android.support:support-v4:25.1.0'
testCompile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services:10.2.0'
}
我的片段:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="ibas.locatix_teamviewer.mapFragment">
<com.google.android.gms.maps.MapView
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_marginTop="12dp"
android:id="@+id/mapView"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
【问题讨论】:
-
您说您更新了依赖项,但是您更新了 GAPPS 吗? stackoverflow.com/q/34291902/4012979
标签: android android-fragments google-play-services