google maps - android app stops working when i export it as an apk -
i have maps fragment in code. when run using 'run app' in android studio works fine. when export signed apk same code not display map. blank screen google logo on bottom left.
this code:
if (build.version.sdk_int < build.version_codes.lollipop) { fm = getactivity().getsupportfragmentmanager(); } else { fm = getchildfragmentmanager(); } mmap = ((supportmapfragment) fm.findfragmentbyid(r.id.map)).getmap();
and fragment is:
<fragment xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/map" tools:context="schoolbus.tracker.datavoice.schoolbusdrawer.mapsfragment" android:name="com.google.android.gms.maps.supportmapfragment" />
i have tried getchildfragmentmanager(), getsupportfragmentmanager, nothing has worked.
once again bug occurs when install signed apk. otherwise maps run fine.
thank you.
replace debug api key of map release key in application.after release apk display google map.
Comments
Post a Comment