Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

com.google.android.gms.R$string #64

Closed
wf9a5m75 opened this issue May 15, 2014 · 7 comments
Closed

com.google.android.gms.R$string #64

wf9a5m75 opened this issue May 15, 2014 · 7 comments
Labels
Milestone

Comments

@wf9a5m75
Copy link
Member

google-play-services.jar version16.0.0 occurs this error because it's not AAR file.

java.lang.NoClassDefFoundError: com.google.android.gms.R$string
    at com.google.android.gms.internal.ib.<init>(Unknown Source)
    at com.google.android.gms.internal.hi.<init>(Unknown Source)
    at com.google.android.gms.location.LocationClient.<init>(Unknown Source)
    at plugin.google.maps.GoogleMaps.initialize(GoogleMaps.java:108)
    at org.apache.cordova.PluginEntry.createPlugin(PluginEntry.java:96)
    at org.apache.cordova.PluginManager.getPlugin(PluginManager.java:278)
    at org.apache.cordova.PluginManager.execHelper(PluginManager.java:232)
    at org.apache.cordova.PluginManager.exec(PluginManager.java:227)
    at org.apache.cordova.ExposedJsApi.exec(ExposedJsApi.java:53)
    at org.apache.cordova.CordovaChromeClient.onJsPrompt(CordovaChromeClient.java:229)
    at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:566)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:130)
    at android.app.ActivityThread.main(ActivityThread.java:3683)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:507)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
    at dalvik.system.NativeStart.main(Native Method)

To prevent this error, link the project to the Google Play Services library, but the Cordova CLI does not provide any automatic way for this step.

@wf9a5m75 wf9a5m75 added this to the v1.0.12 milestone May 15, 2014
ghost pushed a commit that referenced this issue May 16, 2014
@MGMsystems
Copy link

Having the same issue on a my new cordova project. IOS runs perfect, Android app crashed on start.
Same logcat output as posted above.

@wf9a5m75
Copy link
Member Author

Sorry for your inconvenience. This error occurs because of the google-play-services.jar.
For temporally solution, please comments out the below lines:
(1) Comment out the line the below lines:

Line 108
https://github.com/wf9a5m75/phonegap-googlemaps-plugin/blob/0509525c3dcbc5d946dd182d8c84c1cfd46de9ca/src/android/plugin/google/maps/GoogleMaps.java#L108

Line 349
https://github.com/wf9a5m75/phonegap-googlemaps-plugin/blob/0509525c3dcbc5d946dd182d8c84c1cfd46de9ca/src/android/plugin/google/maps/GoogleMaps.java#L349

(2) Don't use map.getMyLocation()

@MGMsystems
Copy link

Still having an error after doing the steps above
screen shot 2014-05-19 at 09 04 02

@wf9a5m75
Copy link
Member Author

I will release the next version in couple of hours. You should test again, and it will be fixed.

@wf9a5m75
Copy link
Member Author

I released the plugin version 1.1.0 (old version name v1.0.12). Please uninstall the plugin, then install it again.

@MGMsystems
Copy link

Android is working again :) Thanks for the quick updates :)

@wf9a5m75
Copy link
Member Author

Great! and sorry for inconvenient.

ghost pushed a commit that referenced this issue Mar 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants