SupportMapFragment에서지도를 가져 오려고하지만 null을 반환합니다. 프래그먼트가 아직 완전히 표시되지 않았으므로지도가 존재하지 않기 때문에 내가 읽은 바가있을 수 있습니다. executePendingTransactions()를 사용하여 수정했지만 지금까지 성공하지 못했습니다.mapFragment.getMap()이 null을 반환합니다.
아이디어를 고치는 방법은 무엇입니까?
<fragment
android:id="@+id/mapFragment"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
그것은 내가이가 있기 때문에 될 수 읽은 내용에서 다음 로그
V/FragmentManager(24224): add: SupportMapFragment{4078c4b8 id=0x7f06003d}
V/FragmentManager(24224): Allocated fragment index SupportMapFragment{4078c4b8 #1 id=0x7f06003d}
V/FragmentManager(24224): moveto CREATED: SupportMapFragment{4078c4b8 #1 id=0x7f06003d}
D/EMR (24224): map should have been initialized
D/EMR (24224): map still null
에 명시된 바와 같이 단편에서 작동하는 데 사용할? – yugidroid
예 (코드 부분 편집, 위 참조) 예 : – cos4
초기화 되었습니까? 그렇지 않으면 아무것도 없으며, 즉 'null'입니다. – yugidroid