Problem mit Google Maps

  • Antworten:0
seaside
  • Forum-Beiträge: 5

04.08.2013, 13:24:10 via Website

Hallo zusammen,

ich versuche die Google Maps Karte in meine App zu integrieren, dabei tritt jedoch der Fehler Couldn't get connection factory client auf. Ich habe schon sehr viel ausprobiert und weiß langsam nicht mehr weiter.

Hier ist mein Code:

MainActivity.java
1import com.google.android.maps.MapActivity;
2import com.google.android.maps.MapView;
3
4import android.os.Bundle;
5import android.app.Activity;
6import android.view.Menu;
7
8public class MainActivity extends MapActivity {
9
10 private MapView mapView;
11
12 @Override
13 protected void onCreate(Bundle savedInstanceState) {
14 super.onCreate(savedInstanceState);
15 setContentView(R.layout.activity_main);
16
17 mapView = (MapView) findViewById(R.id.map_view);
18
19 mapView.setBuiltInZoomControls(true);
20
21 }
22
23 @Override
24 public boolean onCreateOptionsMenu(Menu menu) {
25 // Inflate the menu; this adds items to the action bar if it is present.
26 getMenuInflater().inflate(R.menu.main, menu);
27 return true;
28 }
29
30 @Override
31 protected boolean isRouteDisplayed() {
32 // TODO Auto-generated method stub
33 return false;
34 }
35
36}

activity_main.xml
1<RelativeLayout xmlns:android="http: // schemas.android.com/apk/res/android"
2 xmlns:tools="http: // schemas.android.com/tools"
3 android:layout_width="match_parent"
4 android:layout_height="match_parent"
5 android:paddingBottom="@dimen/activity_vertical_margin"
6 android:paddingLeft="@dimen/activity_horizontal_margin"
7 android:paddingRight="@dimen/activity_horizontal_margin"
8 android:paddingTop="@dimen/activity_vertical_margin"
9 tools:context=".MainActivity" >
10
11 <com.google.android.maps.MapView
12 xmlns:android="http: // schemas.android.com/apk/res/android"
13 android:id="@+id/map_view"
14 android:layout_width="fill_parent"
15 android:layout_height="fill_parent"
16 android:apiKey="AIzaSyBjs7c4wE9X2YajrqWJ7SawetJoq5XmVIg"
17 android:clickable="true"
18 android:enabled="true" />
19
20</RelativeLayout>

Und hier noch die Manifest
1<?xml version="1.0" encoding="utf-8"?>
2<manifest xmlns:android="http: // schemas.android.com/apk/res/android"
3 package="com.example.gmaps2"
4 android:versionCode="1"
5 android:versionName="1.0" >
6
7 <permission
8 android:name="com.example.gmaps2.permission.MAPS_RECEIVE"
9 android:protectionLevel="signature" />
10
11 <uses-permission android:name="com.example.gmaps2.permission.MAPS_RECEIVE" />
12
13 <uses-permission android:name="android.permission.INTERNET" />
14
15 <uses-sdk
16 android:minSdkVersion="11"
17 android:targetSdkVersion="17" />
18
19 <application
20 android:allowBackup="true"
21 android:icon="@drawable/ic_launcher"
22 android:label="@string/app_name"
23 android:theme="@style/AppTheme" >
24 <activity
25 android:name="com.example.gmaps2.MainActivity"
26 android:label="@string/app_name" >
27 <intent-filter>
28 <action android:name="android.intent.action.MAIN" />
29
30 <category android:name="android.intent.category.LAUNCHER" />
31 </intent-filter>
32 </activity>
33
34 <uses-library android:name="com.google.android.maps" />
35 </application>
36
37</manifest>

Der Key ist für Android Apps (Google API Console) . Habe meinen SHA1 Fingerprint mit meinem Package Namen com.example.gmaps2 eingetragen.
Ist das überhaupt notwendig?

Die google-play-service.jar und die google-play-service_lib.jar habe ich beide eingebunden.

Hat jemand von euch einen Tipp was ich noch ausprobieren könnte?

Vielen Dank schon mal :)

— geändert am 04.08.2013, 13:54:53

Antworten