5

I am currently developing an application in Android that uses Google maps. I have followed all the instructions like

  • Including the google play services dependency to my project
  • Downloading google play services in Android SDK
  • Creating an Android key from google developers console.
  • giving the necessary permissions

The google maps were showing up normally as expected until suddenly a black screen starts appearing now.

I get the following lines on logcat.

W/ResourcesManager﹕ Asset path '/system/framework/com.android.media.remotedisplay.jar' does not exist or contains no resources.

W/ResourcesManager﹕ Asset path '/system/framework/com.android.location.provider.jar' does not exist or contains no resources.

I/Google Maps Android API﹕ Google Play services client version: 6587000

I/Google Maps Android API﹕ Google Play services package version: 6774436

This is the dependency I have in my build.gradle file

compile 'com.google.android.gms:play-services:6.5.87'

How do I resolve this issue? Is it due to some update to the google play service? If so I have checked the SDK and I have the latest Google play service installed. Kindly help anyone

Here is the log cat

02-19 13:53:01.212  14731-14749 D/OpenGLRenderer﹕ Render dirty regions requested: true
02-19 13:53:01.218  14731-14731 D/Atlas﹕ Validating map...
02-19 13:53:01.292  14731-14749 I/Adreno-EGL﹕ <qeglDrvAPI_eglInitialize:410>: QUALCOMM Build: 10/03/14, c40da3f, Ifda814c646
02-19 13:53:01.293  14731-14749 I/OpenGLRenderer﹕ Initialized EGL, version 1.4
02-19 13:53:01.311  14731-14749 D/OpenGLRenderer﹕ Enabling debug mode 0
02-19 13:53:04.472  14731-14731 I/x﹕ Making Creator dynamically
02-19 13:53:04.477  14731-14731 W/ResourcesManager﹕ Asset path '/system/framework/com.android.media.remotedisplay.jar' does not exist or contains no resources.
02-19 13:53:04.478  14731-14731 W/ResourcesManager﹕ Asset path '/system/framework/com.android.location.provider.jar' does not exist or contains no resources.
02-19 13:53:04.503  14731-14731 I/Google Maps Android API﹕ Google Play services client version: 6587000
02-19 13:53:04.515  14731-14731 I/Google Maps Android API﹕ Google Play services package version: 6774436
Community
  • 1
  • 1
Viswanth
  • 151
  • 1
  • 2
  • 8
  • I can utilise the google maps services for free in my application right? Or should I be paying to Google? – Viswanth Feb 19 '15 at 16:02
  • try this `compile 'com.google.android.gms:play-services-location:6.5.87'` instead – cYrixmorten Feb 19 '15 at 16:04
  • I just tried it but no luck @cYrixmorten – Viswanth Feb 19 '15 at 16:06
  • Ok was worth a shot, did you update from a previous version of Google Play Services in your app? Just thinking that your device might not have all available updates, and in case your code does not check for this, it might be the cause for the sudden failure. – cYrixmorten Feb 19 '15 at 16:17
  • I have not changed anything. I started developing with the same 'compile 'com.google.android.gms:play-services:6.5.87' from the beginning – Viswanth Feb 19 '15 at 16:26
  • @cYrixmorten I have even checked the version installed by calling the >GooglePlayServicesUtil.isGooglePlayServicesAvailable . It returns a value of 0. So it was a SUCCESS – Viswanth Feb 19 '15 at 16:53
  • Maybe trivial but have you tried uninstalling your app completely and then reinstall? Sounds like an odd problem since you state that it has been working. Have tried once that I had to revoke my API key in the Google console page but do not think that is the problem. – cYrixmorten Feb 19 '15 at 17:02
  • I have tried that as well. I do not seem to understand what I am missing here. I deeply appreciate u trying to help me out @cYrixmorten. Should I also try revoking my api key? – Viswanth Feb 19 '15 at 17:05
  • It cannot hurt. Was kind of random when it happened to me as well, and as I recall it only happened once. Though back then the map would be grey and still have google maps written in the corner, so it seemed as if it was unable to load the tiles. Sounds like you encounter a different behavior. – cYrixmorten Feb 19 '15 at 17:10
  • Does not work even after regenerating my android key. I do not get google maps in the corner, just a black screen entirely – Viswanth Feb 19 '15 at 17:20
  • I am also in similar situation , I am having problem with Lite mode. It was working and all of a sudden i see the grid only and maps doesn't show up. If i try to load normal map it works , only the lite mode has this problem. – darshanz Mar 06 '15 at 18:47

4 Answers4

5

Try these things if your code does not have these:

  • Try adding android:name="com.google.android.gms.maps.SupportMapFragment" to your fragment.xml.

  • Try using extend Fragment instead of extend SupportMapFragment.

  • onMapReady() is triggered by a call to getMapAsync() on your MapFragment be sure to have that.

  • Also check your manifest file if it lacks some permissions

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    
    <permission
    android:name="your.package.name.permission.MAPS_RECEIVE"
    android:protectionLevel="signature" />
    <uses-permission android:name="your.package.name.permission.MAPS_RECEIVE"/>
    <uses-feature
    android:glEsVersion="0x00020000"
    android:required="true"/>
    

Post your log cat so that the exact cause may be found out!!

AniV
  • 3,997
  • 1
  • 12
  • 17
  • Thanks for the suggestions. I have added all the changes you suggested one by one and all at the same time to check if the issue was solved. But no luck. I have added the logcat in the question above. The weird thing is if I create a totally new project, I get the desired map screen. But my current project is showing up the blank screen after working quite well for the past few days. And redoing the project again is too time taking. – Viswanth Feb 19 '15 at 21:02
  • There was a recent Google Play Services update and it might be causing this sudden issue. – Hassaan Feb 20 '15 at 05:26
  • adding just the permissions in the manifest resolve the problem – Pablo Johnson Sep 04 '16 at 22:11
  • Thanks, add permission "" works for me. – chou Nov 17 '16 at 02:17
1
  • remove following import from the list and corresponding methods

    import android.location.LocationListener;
    
  • instead use Location listner from the Google API class and change your interface to complete namespace instead com.google.android.gms.location.LocationListener

For example if you are deriving from interface check text in BOLD

public class Option extends FragmentActivity implements View.OnClickListener, ConnectionCallbacks, OnConnectionFailedListener, LocationSource, com.google.android.gms.location.LocationListener, OnMyLocationButtonClickListener, OnMapReadyCallback {

If do not give complete namespace by default compiler takes Android standard LocationListner and gives error.

bummi
  • 27,123
  • 14
  • 62
  • 101
  • Didn't remove error: asset path '/system/framework/com.google.android.maps.jar' does not exist or contains no resources – Steve Staple Mar 01 '16 at 16:16
0

Please check you have both the permissions in your Manifest -

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
Fenil
  • 1,194
  • 10
  • 11
0

I recently upgraded on my Eclipse on Windows, the Android SDK using Android SDK manager. The Google map that was working earlier stopped working. Looks like there are several changes in the new google play services version 29.

Strange thing - After downloading and updating to new SDK Android 6.0 the earlier google play services files disappeared in the folder. And several error related to google play services cropped up as the file and the project google_play_services.jar was no longer there in the folder \adt-bundle-windows-x86_64-20140702\sdk\extras\google\google_play_services

I then downloaded the version 28 as given in the page as given by Brad Larson Missing "<sdk>/extras/google/google_play_services/libproject" folder after update to revision 30 - After this all error related to google play services disappeared when build target was 5.1.1.

Then while running the app I was still getting error /system/framework/com.google.android.maps.jar does not exist or contains no resource error

(1) As suggested by bummi above I switched from Android 5.1.1 (SDK 22) to Google API 5.1.1 and it started working!! (2) I also tried compiling with Google API 6.0 and it worked.

All other things as told by Bummi above also needs to be there which I had in my project anyway.

Community
  • 1
  • 1