Android shipping build crash - Google Play Services related

Hi

Here is the problem: My Shipping build is crashing at startup. It was working fine before and the Development build works fine. The thing that crashes the app is using the Google Play services, which again worked fine before.

So here is the full story. I was copying the project to another machine and after opening it again on the original PC the Build folder was missing. I have no idea how that happend, but on the phone - that was used as a usb drive the Build folder does exist, however it’s empty…

So basically the Build folder got corrupted.

The app was already in Alpha testing, signed with keystore, working Google Play achievements. Everything was working like a charm.

So I had to make the platform files writeable again, I had to add the icons again. I did recover my keystore file (from Intermediate folder) and put it again in the Build folder. And the new builds are simply crashing on startup. And if I try to upload my new .apk it says that my app is signed with another key:

 Upload failed

You uploaded an APK that is signed with a different certificate to your previous APKs. You must use the same certificate. Your existing APKs are signed with the certificate(s) with fingerprint(s):

But I did not have any other keystore file, so if I did copy it back into the Build folder, than what the hell is wrong with it, or sth else…

Once I turn the Google Play services off everything works fine, including AdMob.

I did also try to change the package name (I did change the name of the company a bit) I have generated a new keystore, I have uploaded the “new” app to the play console, I have connected the new app to the service and after installing it from Google Play it crashed just like the old one…

I have sent the crash report and this is what I got in the Play Developer console:

java.lang.IllegalStateException: A fatal developer error has occurred. Check the logs for further information.
at com.google.android.gms.internal.lh.a(Unknown Source)
at com.google.android.gms.internal.lh.d(Unknown Source)
at com.google.android.gms.internal.la.fv(Unknown Source)
at com.google.android.gms.internal.kz.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5214)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:555)
at dalvik.system.NativeStart.main(Native Method)

At this point I am basically out of ideas. I have tried to package the app with the keystore from backup, and I have tried to package the game under new package name with new keystore, and both are crashing once they try to use Google Play services. To be honest I do not get it why any of these ways are failing. One is using the same keystore file as before, the other one is having different package name and is using it’s own keystore…

Hi rimau,

I’m sorry you’re seeing this problem. Are your builds succeeding without error, but then crashing once deployed to the device? Do you mind attaching the full build output logs and the logcats for crash to this thread as txt files?

Have you gone through and double-checked that you changed the package name has been changed everywhere necessary? Further, searching for your specific error, I found this Stack Overflow thread wherein the user has the same error and it does involve the changing of the keystore file. Have a look and see if any of those answers might relate to your issue.

Thanks!

Hi

I kind of solved the problem. I have created a new ue4 project (not a clone), migrated all the content, set the project settings up manually and the new project works fine with the second keystore - the one with changed package name. I still need to finish a few things but it does not crash and it does connect to Google Play Services on start-up.

The downsize of this operation is that the .apk size has gone up with the fresh project by about 2MB, now my ETC1 build is 50,2MB (sic!) and I was actually expecting something completelly different.

I will make another build of the one that does not work and attach the log output, but fisrt I will need to make up some time. I could also send you the faulty .apk if you wish to inspect it. Just PM on the forums, I am using the same nick.

Thanks

I did figure out the size issue. It was the engine update that has added the mobile resources back to the build :slight_smile:

I was just going to make that test build that crashes on the phone at startup and this time the build failed. As I did solve the problem and there is clearly sth wrong with that old project (the folder was missing) I guess there is no point in investigating it any further.