title: google maps android v2 white screen - not all devices
body: <p>I know there are some questions about this, but none of them helped me.</p>
  
  <p>I'm debugging with a Sony Xperia (API 14) and I always get a white screen with the zoom buttons (+ and -). But I have tested the same code with a Galaxy Nexus and I can see the map.</p>
  
  <p>If it's working in another device but not in mine, I guess it is not an API key problem, permission problem, layout or code problem. I also have checked the GooglePlayServices and is always returning SUCCEED.</p>
  
  <p>This is the layout code:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout 
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:map="http://schemas.android.com/apk/res-auto"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical" &gt;
  
  
  &lt;fragment 
      android:id="@+id/map"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      class="com.google.android.gms.maps.MapFragment"/&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>This is the java code:</p>
  
  <pre><code>package com.nanonino.realtor;
  
  import com.google.android.gms.common.ConnectionResult;
  import com.google.android.gms.common.GooglePlayServicesUtil;
  import com.google.android.gms.maps.MapFragment;
  
  import android.app.Activity;
  import android.app.Dialog;
  import android.app.FragmentTransaction;
  import android.content.Intent;
  import android.os.Bundle;
  import android.os.StrictMode;
  import android.support.v4.app.FragmentActivity;
  import android.view.View;
  import android.view.View.OnClickListener;
  import android.widget.ImageButton;
  import android.widget.ImageView;
  
  public class ByLocation extends Activity {
  
  @Override
  protected void onCreate (Bundle savedInstanceState){
  
      super.onCreate(savedInstanceState);
  
      //setContentView(R.layout.by_location_list);
      setContentView(R.layout.by_location_map);   
  
      //if state has a value different from 0...OH OH!!! Problem, you have
      //to tell the user to install GooglePlayService in the device
      int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
      switch (resultCode) {
          case ConnectionResult.SUCCESS: // proceed
              break;
          case ConnectionResult.SERVICE_MISSING:
          case ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED:
          case ConnectionResult.SERVICE_DISABLED:
              Dialog dialog = GooglePlayServicesUtil.getErrorDialog(resultCode, this, 1);
              dialog.show();
      }
  
  }
  </code></pre>
  
  <p>I have many imports because I have tried everything. But now I know that the problem is with the device, not the code.</p>
  
  <p>Any idea?</p>