2017-03-12 6 views
0

自分のアクティビティに動的に表示するMapFragmentがあります。Google Playサービスのため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" /> 

そして、ここが私の活動です: enter image description here

+0

あなたは依存関係を更新しましたが、GAPPSを更新しましたか? http://stackoverflow.com/q/34291902/4012979 –

答えて

0

端末のGoogle Playサービスのバージョンが古くなっています。アップデートボタンをクリックするだけで、プレイストアからデバイスの最新バージョンをダウンロードすることができます。

編集: questionsがこのようにStackoverflowにあります。 これらの質問と回答が役に立ちます。

documentationによれば、エミュレータはAndroid 4.2.2以上を使用する必要があります。 GoogleはサービスのSDKを再生使用しているときにアプリをテストするには

、あなたがいずれかを使用する必要があります。

  • アンドロイド4.0以上を実行し、Google Playストアを含んで互換性のあるAndroidデバイス。

-Android 4.2.2以降のGoogle APIプラットフォームを実行するAVD搭載のAndroidエミュレータ。

+0

「更新」をクリックすると、アプリケーションがクラッシュする...何をする? – skm

+0

@skmどのデバイスにどのAndroidバージョンが付属していますか? – Rockney

+0

自分のデバイス(サムスンs6)でそれは正常に動作しますが、エミュレータ(AVD)には、プレイリストを更新する必要があるというこの情報が表示されます...アップデートをクリックするとクラッシュします。 – skm

関連する問題