1

i have built an app that has a map using google maps api, which runs successfully on debug and release mode. i decided to get the apk file from the project, to see if the app still runs well.

after installing the app on my phone (android 7.0 api 24), i have noticed that everything works well except the map. the problem is that instead of map, i see blank screen. i searched for solution in the web, and perhaps the cause for this problem is a bug in Android Manifest:

<?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="Passenger.Passenger" android:versionCode="1" android:versionName="1.0" android:installLocation="auto">
   <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="26" />
   <application android:label="@string/app_name" android:icon="@drawable/Location_icon">
     <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="....." />
     <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
   </application>
   <permission android:name="com.Passenger.Passenger.permission.MAPS_RECEIVE" android:protectionLevel="signature" />
   <uses-feature android:glEsVersion="0x00020000" android:required="true" />
   <uses-permission android:name="com.Passenger.Passenger.permission.MAPS_RECEIVE" />
   <uses-permission android:name="android.permission.INTERNET" />
   <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
   <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
   <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
   <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
   <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
 </manifest>

I saw that some of you taught the question duplicated and close to another question that talking about an error after publishing the app into the googlw store.

My problem is that I didn't upload my app to google app store, I am checking my app's apk file

thanks

mega5800
  • 87
  • 7
  • 2
    this could be a fragment issue. Do you mind sharing some code where you have handled onMapReady function? and also where you are attaching the Map fragment – Deepak kaku Apr 06 '18 at 21:11
  • i implemented IOnMapReadyCallback and wrote this method:public void OnMapReady(GoogleMap googleMap) { GMap = googleMap; } the rest of finding the location itself is in another method. – mega5800 Apr 06 '18 at 21:44
  • you also need to add a fragment in the layout xml. have you done that? – Deepak kaku Apr 06 '18 at 21:58
  • here is the xml code that supposed to be the map in the app. there's a warning that the class is not declared altough the app works on debug and release mode – mega5800 Apr 06 '18 at 22:20
  • this could also happen if your google play services is out of date or you do not have a valid API key – Deepak kaku Apr 06 '18 at 22:25
  • my google play services is updated. the google map package in my app is also updated, and just now i got new api key, and still the problem exists – mega5800 Apr 06 '18 at 22:52

0 Answers0