I get a NullPointerException when trying to start fragment in Roboeltric -
java.lang.NullPointerException
at com.google.android.gms.common.internal.zzh.zzaT(Unknown Source)
at com.google.android.gms.common.internal.zzh.zzaT(Unknown Source)
at com.google.android.gms.common.internal.zzh.zzi(Unknown Source)
at com.google.android.gms.common.internal.zzh.zzi(Unknown Source)
The fragment contains a SupportMapFragment, here is the XML:
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/recyclerVenue"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:id="@+id/map" />
The SupportMapFragment
is in a fragment (android.support.v4.app.Fragment) as well
@Before
public void setUp() {
mapFragment = new MapFragment();
startFragment(mapFragment); // Crashes here
}
Changing the FrameLayout
to fragment
causes the sorry not implemented
message. Can someone point me in the right direction since it works when running on device/emulator? thanks