Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I went through this issue a while back. First check to see if your fragment is found by the fragment manager. </p> <p>If not try replacing the way you've put your fragment into your view. If you want an example of another way I've posted a maps example <a href="https://github.com/ChristopherTulip/MapHomeTest" rel="nofollow noreferrer">here</a></p> <p>Any more questions feel free to comment and I'll work through it with you :)</p> <p><strong>EDIT</strong></p> <p>have you got the correct API key in there? If you can't contact Google's servers then there's a good chance that that's your problem. Otherwise may be a manifest issue make sure you have READ_GSERVICES and INTERNET permissions.</p> <p>See <a href="https://stackoverflow.com/questions/13727992/google-maps-api-v2-failed-to-load-map-could-not-contact-google-servers">Google Maps API V2 &#39;Failed to Load Map. Could not contact Google Servers&#39;</a></p> <p><strong>Edit 2</strong></p> <p>Ok so I was being lazy before and just referring you to my project. If you were getting a connection to maps in your project lets start from there. </p> <p>What I was suggesting in my original response was to check and see if <code>myMapFragment</code> was null. If it is great try doing something along the lines of the following:</p> <pre><code>FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); SupportMapFragment myMapFragment = new SupportMapFragment(); ft.replace(R.id.map, myMapFragment, Constant.TAXI_FRAGMENT_ID); ft.commit(); </code></pre> <p>Where R.id.map is an empty <code>FrameLayout</code></p> <p>If <code>myMapFragment</code> isn't null then try extending <code>SupportMapFragment</code> and running the following test:</p> <pre><code>public class MyMapFragment extends SupportMapFragment { @Override public void onActivityCreated() { if (getMap() == null) Log.e("TAG", "There's something very wrong here"; } } </code></pre> <p>Also if you do this make sure that you are inflating an instance of <code>MyMapFragment</code> not of <code>SupportMapFragment</code></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload