Array Array - 3 months ago 20
Android Question

Android Google Maps v2 not shown on certain devices

I found issue that Google Maps V2 for Android are not shown on certain devices (both release version).

Devices for comparison: Nexus 5 and 1 plus 1.

Any ideas?

UPD:

Does it make sense the package name? I have package name: com.severenity - without third part. I have created absolutely new project from scratch using maps template and it worked with name: com.severenity.test. I also have SupportMapFragment inside my another fragment. With MapView on both project maps are not shown. Any ideas?

Answer

Here is what is going on with this issue, may be helpful for others:

  • I created separate project, which had MainActivity and SupportMapFragment in the layout. It worked on devices, that were not showing the map.
  • In my project I had, lets say, CustomFragment, which had in its layout SupportMapFragment:

    <FrameLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/map" />
    
    <!-- other views go here -->
    

    And it does not work, BUT! I had "hardwareAccelerated='false'" in AndroidManifest, so after I turned it to "hardwareAccelerated='true'" it started to work on other devices. Magic? At least, this is the answer.

Comments