Android Imediate crash after implementing unity IAP

Ok I got it running. Seems like this was purely a google issue, and also it seems to be related to switching from the internal testing track to the alpha testing track. At least it was for me.

Here is the solution that worked for me.

ainscough
So I figured mine out. However, it seems like it is most likely a different problem then what you guys are experiencing.

My story was:

  1. Everything worked fine on the internal release track for about 15 builds in a row
  2. Got Google Play Beta approval
  3. Downloaded the game on the Beta build
  4. Black screen as mentioned above
  5. The same Beta build still worked on other people’s phones

The main problem was that somehow the Google Play cache must have gotten either a duplicate entry for the game or some other data glitch. Therefore, when I tried to open as a direct from Unity build (without uploading to Google Play), it worked fine because Google Play wasn’t handling the registration of it. I have a feeling the game was trying to read part of one build and part of another or something similar.

The fix was:

  1. Uninstall your game
  2. Go to your phones Settings → Apps
  3. Go to Google Play Store and tap the Force Stop button
  4. Go to the Storage screen (by clicking on the Storage line item under Force Stop) and tap the Clear Data button - this will also active the Clear Cache button. If it doesn’t, clear the cache too.
  5. Follow steps 3 and 4 for the Google Play services App
  6. Restart your phone (this part was necessary - I tried it without doing this and the fix didn’t initially work)
  7. Redownload your game from Google Play
  8. It should start up normally.

Hopefully this helps someone else. I spent 20+ hours and 4 days ripping my game down to the bones and it wasn’t really even a Unity problem…

2 Likes