2

I have a big problem with an app and I don't understand what's going on...

My app was working fine in debug mode so I decided to publish it. Once it was on the store O downloaded it and tested it again and noticed there was a huge problem : The app was crashing when trying to access the game center. I had an error of this type : "An error occurred in play games" (it's not the exact message, only a translation of the french message that I got).

I had a look at the console on android studio and saw this error message:

06-16 10:30:34.501 4208-4763/? E/GamesServer: Attempting to access a resource for another application. Check your resource IDs.
06-16 10:30:34.551 4208-4763/? E/MultiDataOperation: Attempt to access application XXXX from application YYYY.

Someone adviced me to unpublish everything and to start again. That's what I did but there's still a problem:

screenshot of the error message on the app in beta mode

I really don't understand what's going on and what to do to solve this issue. Could you please help me ?

Thanks a lot.

user2449253
  • 103
  • 2
  • 13

1 Answers1

1

You should check your build.gradle file in the /app folder., and more specifically, the release part of your buildTypes section. Some of those options can wreck havoc if not kept in mind. Example: if you have minifyEnabled true there, it means gradle will obfuscate your code during compile time. One of the things that happens during obfuscation is all your class variable names are changed to something that isn't readily readable to humans, to make it harder to reverse- engineer your app. But a side effect is that if you are using, say, a gson library for mapping JSON to your models, it no longer can figure out what to map JSON fields to. That is why there is the @SerialisedName annotation you can add to the variables to ensure the proper mapping. I am not sure what your problem is exactly, but looking in the buildTypes section is a good place to start.

C0D3LIC1OU5
  • 8,600
  • 2
  • 37
  • 47
  • Thanks for your help! I will check this file and let you know. – user2449253 Jun 29 '16 at 22:41
  • Hello again. I had a look and actually minifyEnabled is already set to false... So the problem is not there... Do you have any other idea ? It's been weeks that I have this problem and I'm completely desperate... Thanks for your help! – user2449253 Jun 30 '16 at 08:46
  • Did you check what the prompt is telling you to check? – C0D3LIC1OU5 Jun 30 '16 at 15:12
  • you mean in the console ? – user2449253 Jun 30 '16 at 16:18
  • No i mean double checking your apps package name and making sure it matches the one registered in Google API and stuff. Seems like you have some package mismatch based on the screenshot you've provided – C0D3LIC1OU5 Jun 30 '16 at 18:44