Still Gets "Couldn't Get Connection Factory Client" Error
Solution 1:
I guess you have mixed some of V1 and V2 features (like using <uses-library android:name="com.google.android.maps" />
in manifest and use of GeoPoint
etc. (https://groups.google.com/forum/?fromgroups=#!topic/android-developers/CGF5X1HMLuY)
Try with the sample code below :
MActivity.java
public class MActivity extends FragmentActivity{
private GoogleMap map;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_map);
map = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))
.getMap();
double lat = 6.796396;
double longi = 79.877823;
final LatLng HAMBURG = new LatLng(lat,longi);
Marker hamburg = map.addMarker(new MarkerOptions().position(HAMBURG)
.title("Hamburg"));
map.moveCamera(CameraUpdateFactory.newLatLngZoom(HAMBURG, 15));
}
Map.xml
<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"
tools:context=".MapsActivity" >
<fragment
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.SupportMapFragment" />
</RelativeLayout>
Remove <uses-library android:name="com.google.android.maps" />
from manifest.
Solution 2:
Running google map v2 on emulator has several steps, so I prepared step by step tutorial to show how you can use google map android v2 on emulator(android 4.2.2) have a look at to my blog: http://umut.tekguc.info/en/content/google-android-map-v2-step-step
Solution 3:
Actually I've been adding a different project's .jar file & This helped me to correctly add a external .jar to the project.Now I don't get "unresolved type" error.. Thank you everyone for pointing me to the correct direction you people are awesome.
Post a Comment for "Still Gets "Couldn't Get Connection Factory Client" Error"