Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

isGooglePlayServicesAvailable NoClassDefFoundError

$
0
0

I'm building an app that previously worked on Android, showing maps on most devices. But now it crashes on this line:

var rc = require('ti.map').isGooglePlayServicesAvailable();

This gives the error below. I have tried a number of recommendations from this forum, without success. My setup is as follows:

  • Ti Studio 3.4.1.201410281727 on Mac OS 10.10
  • Ti SDK from 3.3.0 to 3.4.1 gives the same result
  • I have updated all my Android SDKs to the latest versions
  • I have a valid Google Maps API Key (unchanged since the last version, which is on Google Play)
  • I don't know the difference between a development API key and production, I only have the one key, but this problem happens when installed via USB or from HockeyApp
  • the devices I'm testing have the latest Google Play Services installed, and are all running Android 2.x or 3.x
  • ti.map is version 2.1.4 (the latest for Android)
  • I am creating the map view in code, not in the Alloy view:

var mapview = Map.createView({mapType:Map.NORMAL_TYPE});

Any ideas?

[INFO] :   dalvikvm: Could not find method com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable, referenced from method ti.map.MapModule.isGooglePlayServicesAvailable
[WARN] :   dalvikvm: VFY: unable to resolve static method 9651: Lcom/google/android/gms/common/GooglePlayServicesUtil;.isGooglePlayServicesAvailable (Landroid/content/Context;)I
[INFO] :   about to test Alloy.Globals.Map.isGooglePlayServicesAvailable = function isGooglePlayServicesAvailable() { [native code] }
[WARN] :   W/System.err: java.lang.NoClassDefFoundError: com.google.android.gms.common.GooglePlayServicesUtil
[WARN] :   W/System.err:    at ti.map.MapModule.isGooglePlayServicesAvailable(MapModule.java:74)
[WARN] :   W/System.err:    at org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)
[WARN] :   W/System.err:    at org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:64)
[WARN] :   W/System.err:    at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:884)
[WARN] :   W/System.err:    at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1107)
[WARN] :   W/System.err:    at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:347)
[WARN] :   W/System.err:    at android.os.Handler.dispatchMessage(Handler.java:95)
[WARN] :   W/System.err:    at android.os.Looper.loop(Looper.java:132)
[WARN] :   W/System.err:    at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112)
[ERROR] :  isGooglePlayServicesAvailable error: Error: com.google.android.gms.common.GooglePlayServicesUtil

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>