S
seaside
Neues Mitglied
- 0
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 (habe ihn aus diesem Tutorial: Android Google Maps Tutorial | Java Code Geeks)
MainActivity.java
activity_main.xml
Und hier noch die Manifest
Der Key ist für Android Apps. Habe meine 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
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 (habe ihn aus diesem Tutorial: Android Google Maps Tutorial | Java Code Geeks)
MainActivity.java
Code:
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
public class MainActivity extends MapActivity {
private MapView mapView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mapView = (MapView) findViewById(R.id.map_view);
mapView.setBuiltInZoomControls(true);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
@Override
protected boolean isRouteDisplayed() {
// TODO Auto-generated method stub
return false;
}
}
activity_main.xml
Code:
<RelativeLayout 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"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<com.google.android.maps.MapView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/map_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:apiKey="AIzaSyBjs7c4wE9X2YajrqWJ7SawetJoq5XmVIg"
android:clickable="true"
android:enabled="true" />
</RelativeLayout>
Und hier noch die Manifest
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.gmaps2"
android:versionCode="1"
android:versionName="1.0" >
<permission
android:name="com.example.gmaps2.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="com.example.gmaps2.permission.MAPS_RECEIVE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.gmaps2.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<uses-library android:name="com.google.android.maps" />
</application>
</manifest>
Der Key ist für Android Apps. Habe meine 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
Zuletzt bearbeitet: