UnityGPGPlugin icon indicating copy to clipboard operation
UnityGPGPlugin copied to clipboard

java.lang.NoClassDefFoundError: com.google.android.gms.R$string

Open Dblfstr opened this issue 11 years ago • 14 comments

Hello, I seem to have some crashes while using your plugin. Mostly it works great! But on a select few devices I get this error.

java.lang.Error: FATAL EXCEPTION [main] Unity version : 4.3.4f1 Device model : alps 06v20_v89_gq3009fwvga_2g Device fingerprint: unknown

Caused by: java.lang.NoClassDefFoundError: com.google.android.gms.R$string at com.google.android.gms.common.GooglePlayServicesUtil.b(Unknown Source) at com.google.android.gms.common.GooglePlayServicesUtil.a(Unknown Source) at com.google.android.gms.common.GooglePlayServicesUtil.getErrorDialog(Unknown Source) at com.nerdiacs.nerdgpgplugin.NerdGPG$1.run(NerdGPG.java:149) at android.os.Handler.handleCallback(Handler.java:725) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:153) at android.app.ActivityThread.main(ActivityThread.java:5297) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600) at dalvik.system.NativeStart.main(Native Method)

Dblfstr avatar Feb 13 '14 14:02 Dblfstr

Which version of OS is that? Looks like it is missing google play service resource files.

On Thu, Feb 13, 2014 at 3:44 PM, Dblfstr [email protected] wrote:

Hello, I seem to have some crashes while using your plugin. Mostly it works great! But on a select few devices I get this error.

java.lang.Error: FATAL EXCEPTION [main] Unity version : 4.3.4f1 Device model : alps 06v20_v89_gq3009fwvga_2g Device fingerprint: unknown

Caused by: java.lang.NoClassDefFoundError: com.google.android.gms.R$string at com.google.android.gms.common.GooglePlayServicesUtil.b(Unknown Source) at com.google.android.gms.common.GooglePlayServicesUtil.a(Unknown Source) at com.google.android.gms.common.GooglePlayServicesUtil.getErrorDialog(Unknown Source) at com.nerdiacs.nerdgpgplugin.NerdGPG$1.run(NerdGPG.java:149) at android.os.Handler.handleCallback(Handler.java:725) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:153) at android.app.ActivityThread.main(ActivityThread.java:5297) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600) at dalvik.system.NativeStart.main(Native Method)

Reply to this email directly or view it on GitHubhttps://github.com/faizann/UnityGPGPlugin/issues/8 .

faizann avatar Feb 13 '14 14:02 faizann

I get the same exception on a Sony Xperia Arc S running 4.0.4. Would it be possible to simply catch this exception and do nothing?

ValentinH avatar Feb 28 '14 22:02 ValentinH

You can catch exception on NerdGPG.java line 149 but that line is to show an errorDialog which allows user to update his GooglePlay libraries.

It seems like there is missing resources. Can you check in intermediary files that all GooglePlayResources also are being put in APK? It might be that reason as it cannot find a generated R class.

On Fri, Feb 28, 2014 at 11:01 PM, Valentin Hervieu <[email protected]

wrote:

I get the same exception on a Sony Xperia Arc S running 4.0.4. Would it be possible to simply catch this exception and do nothing?

Reply to this email directly or view it on GitHubhttps://github.com/faizann/UnityGPGPlugin/issues/8#issuecomment-36398935 .

faizann avatar Mar 01 '14 09:03 faizann

I have the same problem with my Unity game. I get the exception when start game and my game has been crashed immediately.

This is my code:

void Start() { Social.Active = new UnityEngine.SocialPlatforms.GPGSocial(); NerdGPG.Instance().init(); }

It occurs on these devices:

  • New Tablet Galaxy(WSVGA)
  • Premium Galaxy (qHD)
  • Tablet Galaxy (WQXGA)
  • Tablet Galaxy (WSVGA)
  • Premium Galaxy (fHD)

Please help me.

canhdx avatar Mar 05 '14 16:03 canhdx

That doesn't give any info. Did you try the sample? does it crash too?

On Wed, Mar 5, 2014 at 5:35 PM, canhdx [email protected] wrote:

I have the same problem with my Unity game. I get the exception when start game and my game has been crashed immediately.

This is my code:

void Start() { Social.Active = new UnityEngine.SocialPlatforms.GPGSocial(); NerdGPG.Instance().init(); }

It occurs on these devices:

  • New Tablet Galaxy(WSVGA)
  • Premium Galaxy (qHD)
  • Tablet Galaxy (WQXGA)
  • Tablet Galaxy (WSVGA)
  • Premium Galaxy (fHD)

Please help me.

Reply to this email directly or view it on GitHubhttps://github.com/faizann/UnityGPGPlugin/issues/8#issuecomment-36762543 .

faizann avatar Mar 06 '14 09:03 faizann

I mean, i have the same exception: Caused by: java.lang.NoClassDefFoundError: com.google.android.gms.R$string at com.google.android.gms.common.GooglePlayServicesUtil.b(Unknown Source) at com.google.android.gms.common.GooglePlayServicesUtil.a(Unknown Source) at com.google.android.gms.common.GooglePlayServicesUtil.getErrorDialog(Unknown Source) at com.nerdiacs.nerdgpgplugin.NerdGPG$1.run(NerdGPG.java:149) at android.os.Handler.handleCallback(Handler.java:725) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:153) at android.app.ActivityThread.main(ActivityThread.java:5297) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600) at dalvik.system.NativeStart.main(Native Method)

Do you have plan to update to fix this bug?

canhdx avatar Mar 07 '14 12:03 canhdx

I dont have any of those tablets. But this weekend I will try to test on my Galaxy S4 and Nexus 10 tablet. Will fix if I find issues.

What manufacturer is that for those tablets?

On Fri, Mar 7, 2014 at 1:07 PM, canhdx [email protected] wrote:

I mean, i have the same exception:

Caused by: java.lang.NoClassDefFoundError: com.google.android.gms.R$string at com.google.android.gms.common.GooglePlayServicesUtil.b(Unknown Source) at com.google.android.gms.common.GooglePlayServicesUtil.a(Unknown Source) at com.google.android.gms.common.GooglePlayServicesUtil.getErrorDialog(Unknown Source) at com.nerdiacs.nerdgpgplugin.NerdGPG$1.run(NerdGPG.java:149) at android.os.Handler.handleCallback(Handler.java:725) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:153) at android.app.ActivityThread.main(ActivityThread.java:5297) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600) at dalvik.system.NativeStart.main(Native Method)

Do you have plan to update to fix this bug?

Reply to this email directly or view it on GitHubhttps://github.com/faizann/UnityGPGPlugin/issues/8#issuecomment-37018493 .

faizann avatar Mar 07 '14 14:03 faizann

I've tested on Samsung galaxy s2 and s3, it run normally. But when i upload game to Google Play store and Samsung store, i've been reported these devices was crashed:

Google Play store:

  • Nextbook Next7P12 (M727MC)
  • Galaxy S4 (ja3g)
  • Galaxy Tab 7.7 (SCH-I815)
  • Optimus L3 (e0)
  • Fly

And these are from Samsung store:

  • High-end Galaxy (HVGA)
  • New Tablet Galaxy Wi-Fi (WSVGA)
  • New Tablet Galaxy(WSVGA)
  • Premium Galaxy (qHD
  • Premium Galaxy (WVGA)
  • Tablet Galaxy (WSVGA)
  • Tablet Galaxy (WXGA)
  • Tablet Galaxy Wi-Fi (WQXGA)

I don't know about manufacturers of them, but i think the devices which have been reported from Samsung store were from Samsung.

canhdx avatar Mar 07 '14 15:03 canhdx

I will check on S4 as it is also listed in devices.

On Fri, Mar 7, 2014 at 4:16 PM, canhdx [email protected] wrote:

I've tested on Samsung galaxy s2 and s3, it run normally. But when i upload game to Google Play store and Samsung store, i've been reported these devices was crashed:

Google Play store:

  • Nextbook Next7P12 (M727MC)
  • Galaxy S4 (ja3g)
  • Galaxy Tab 7.7 (SCH-I815)
  • Optimus L3 (e0)
  • Fly

And these are from Samsung store:

  • High-end Galaxy (HVGA)
  • New Tablet Galaxy Wi-Fi (WSVGA)
  • New Tablet Galaxy(WSVGA)
  • Premium Galaxy (qHD
  • Premium Galaxy (WVGA)
  • Tablet Galaxy (WSVGA)
  • Tablet Galaxy (WXGA)
  • Tablet Galaxy Wi-Fi (WQXGA)

I don't know about manufacturers of them, but i think the devices which have been reported from Samsung store were from Samsung.

Reply to this email directly or view it on GitHubhttps://github.com/faizann/UnityGPGPlugin/issues/8#issuecomment-37032802 .

faizann avatar Mar 07 '14 15:03 faizann

Any news or solution to this issue? I have the same crash report from a few customers on Google Play.

java.lang.Error: FATAL EXCEPTION [main] Unity version : 4.2.2f1 Device model : samsung GT-P3100 (Galaxy Tab2 7.0 )

Caused by: java.lang.NoClassDefFoundError: com.google.android.gms.R$string at com.google.android.gms.common.GooglePlayServicesUtil.b(Unknown Source) at com.google.android.gms.common.GooglePlayServicesUtil.a(Unknown Source) at com.google.android.gms.common.GooglePlayServicesUtil.getErrorDialog(Unknown Source) at com.nerdiacs.nerdgpgplugin.NerdGPG$1.run(NerdGPG.java:149) at android.os.Handler.handleCallback(Handler.java:605) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4514) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557) at dalvik.system.NativeStart.main(Native Method)

Thankful for any tip to fix it, thanks!

cluxen avatar Mar 20 '14 05:03 cluxen

This keeps pointing to fact that the resources from googleplay sdk are missing.

Can you check in intermediate files that are built by Unity if there is R.java in com/google/android/gms I unfortunately didn't get time to try it myself.

On Thu, Mar 20, 2014 at 6:51 AM, cluxen [email protected] wrote:

Any news or solution to this issue? I have the same crash report from a few customers on Google Play.

java.lang.Error: FATAL EXCEPTION [main] Unity version : 4.2.2f1 Device model : samsung GT-P3100 (Galaxy Tab2 7.0 )

Caused by: java.lang.NoClassDefFoundError: com.google.android.gms.R$string at com.google.android.gms.common.GooglePlayServicesUtil.b(Unknown Source) at com.google.android.gms.common.GooglePlayServicesUtil.a(Unknown Source) at com.google.android.gms.common.GooglePlayServicesUtil.getErrorDialog(Unknown Source) at com.nerdiacs.nerdgpgplugin.NerdGPG$1.run(NerdGPG.java:149) at android.os.Handler.handleCallback(Handler.java:605) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4514)

at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557) at dalvik.system.NativeStart.main(Native Method)

Thankful for any tip to fix it, thanks!

Reply to this email directly or view it on GitHubhttps://github.com/faizann/UnityGPGPlugin/issues/8#issuecomment-38137291 .

faizann avatar Mar 20 '14 09:03 faizann

There is a R.java file being created when I generate an apk from within Unity, in "Unity project folder /Temp/gen/com/(my own package name)/R.java".

cluxen avatar Mar 20 '14 10:03 cluxen

Am also get same error as : Caused by: java.lang.NoClassDefFoundError: com.google.android.gms.R$string

I got solution by: comment google service and call only required services /compile 'com.google.android.gms:play-services:8.4.0'/

compile 'com.google.android.gms:play-services-maps:8.4.0'
compile 'com.google.android.gms:play-services-gcm:8.4.0'

Finally i got solution, I hope its usefull to everyone. Try it...

sathishmscict avatar Apr 02 '16 14:04 sathishmscict

Hi, View my answer at : http://stackoverflow.com/questions/35194687/app-crash-with-this-error-in-some-device-java-lang-noclassdeffounderror-com-go

Thanks.

lesabag avatar May 04 '16 08:05 lesabag