error al ejecutar google maps api v2

Estoy usando google play services r14 y no pude ejecutar la aplicación en ningún dispositivo.

01-23 12:07:37.309: E/AndroidRuntime(7056): FATAL EXCEPTION: main 01-23 12:07:37.309: E/AndroidRuntime(7056): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.mapstest/com.example.mapstest.MainActivity}: java.lang.NullPointerException 01-23 12:07:37.309: E/AndroidRuntime(7056): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2114) 01-23 12:07:37.309: E/AndroidRuntime(7056): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2139) 01-23 12:07:37.309: E/AndroidRuntime(7056): at android.app.ActivityThread.access$700(ActivityThread.java:143) 01-23 12:07:37.309: E/AndroidRuntime(7056): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1241) 01-23 12:07:37.309: E/AndroidRuntime(7056): at android.os.Handler.dispatchMessage(Handler.java:99) 01-23 12:07:37.309: E/AndroidRuntime(7056): at android.os.Looper.loop(Looper.java:137) 01-23 12:07:37.309: E/AndroidRuntime(7056): at android.app.ActivityThread.main(ActivityThread.java:4963) 01-23 12:07:37.309: E/AndroidRuntime(7056): at java.lang.reflect.Method.invokeNative(Native Method) 01-23 12:07:37.309: E/AndroidRuntime(7056): at java.lang.reflect.Method.invoke(Method.java:511) 01-23 12:07:37.309: E/AndroidRuntime(7056): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038) 01-23 12:07:37.309: E/AndroidRuntime(7056): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805) 01-23 12:07:37.309: E/AndroidRuntime(7056): at dalvik.system.NativeStart.main(Native Method) 01-23 12:07:37.309: E/AndroidRuntime(7056): Caused by: java.lang.NullPointerException 01-23 12:07:37.309: E/AndroidRuntime(7056): at com.example.mapstest.MainActivity.onCreate(MainActivity.java:25) 01-23 12:07:37.309: E/AndroidRuntime(7056): at android.app.Activity.performCreate(Activity.java:5184) 01-23 12:07:37.309: E/AndroidRuntime(7056): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094) 01-23 12:07:37.309: E/AndroidRuntime(7056): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2078) 01-23 12:07:37.309: E/AndroidRuntime(7056): ... 11 more 

Mi código Mainfest.xml:

                      

MainActivity.java:

 import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.MapFragment; import com.google.android.gms.maps.SupportMapFragment; import com.google.android.gms.maps.model.LatLng; import com.google.android.gms.maps.model.Marker; import com.google.android.gms.maps.model.MarkerOptions; import android.os.Bundle; import android.app.Activity; import android.support.v4.app.FragmentActivity; import android.view.Menu; public class MainActivity extends FragmentActivity { private static GoogleMap mMap; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap(); mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE); final LatLng CIU = new LatLng(35.21843892856462, 33.41662287712097); Marker ciu = mMap.addMarker(new MarkerOptions() .position(CIU).title("My Office")); } @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; } 

activity_main.xml:

     

Hecho todos los ajustes para los servicios de Google Play. ¿Ocurre este error debido a la versión del servicio de Google Play? Si esta es la razón, ¿cómo cambiar la revisión del servicio Google Play 14 a 10? ¿Alguna solución?

Usa algo como esto:

  1. Update the google play services in the SDK. 2. Manually uninstall the App from device and restart the device. i have tried it and its going perfectly bro Also do one thing get the new api key to edited the new sh1 code from https://code.google.com/apis/console/ you can get your sh1 code from window- preference-android-buid 

Tu mMap es nulo. Intente usar SupportMapFragment en el diseño y use getSupportFragmentManager () en el código, como esto:

   

y este código:

  mMap = ((SupportMapFragment)getSupportFragmentManager() .findFragmentById(R.id.map)).getMap(); 

En tu Manifiesto de Android no lo has especificado.

  

use android: name en lugar de android: class. Así cambiará el fragmento en su diseño como se muestra a continuación

  

y usa esto en tu archivo java para definir mMap

  mMap = ((SupportMapFragment)getSupportFragmentManager() .findFragmentById(R.id.map)).getMap();