2015 game project Crash

You have multiple crashes going on. Here is the first:

10-16 11:53:59.554 602 622 I ActivityManager: Displayed com.bendy.onnightmare/com.ansca.corona.CoronaActivity: +2s222ms 10-16 11:53:59.580 12491 12507 V Corona : \> Class.forName: network.LuaLoader 10-16 11:53:59.586 12491 12507 V Corona : \< Class.forName: network.LuaLoader 10-16 11:53:59.586 12491 12507 V Corona : Loading via reflection: network.LuaLoader 10-16 11:53:59.649 12491 12507 I Corona : Platform: Nexus 9 / ARM Neon / 7.1.1 / NVIDIA Tegra / OpenGL ES 3.1 NVIDIA 343.00 / 2018.3326 / English | US | en\_US | en 10-16 11:53:59.666 5707 5707 W IInputConnectionWrapper: reportFullscreenMode on inexistent InputConnection 10-16 11:53:59.676 12491 12507 V Corona : \> Class.forName: \_Corona\_Build\_Number.LuaLoader 10-16 11:53:59.711 12491 12507 V Corona : \> Class.forName: shared.google.play.services.base.LuaLoader 10-16 11:53:59.713 12491 12507 V Corona : \< Class.forName: shared.google.play.services.base.LuaLoader 10-16 11:53:59.713 12491 12507 V Corona : Loading via reflection: shared.google.play.services.base.LuaLoader 10-16 11:53:59.734 602 704 W ActivityManager: Unable to start service Intent { cmp=com.bendy.onnightmare/shared.google.play.services.base.PackageStateChangedService } U=0: not found 10-16 11:53:59.743 12491 12507 V Corona : \> Class.forName: \_CoronaSetup.LuaLoader 10-16 11:53:59.751 12491 12516 D NetworkSecurityConfig: No Network Security Config specified, using platform default 10-16 11:53:59.773 12491 12507 V Corona : \> Class.forName: CoronaProvider.licensing.google.LuaLoader 10-16 11:53:59.773 12491 12507 V Corona : \< Class.forName: CoronaProvider.licensing.google.LuaLoader 10-16 11:53:59.814 12491 12507 V Corona : Loading via reflection: CoronaProvider.licensing.google.LuaLoader 10-16 11:53:59.883 12491 12507 E LicenseChecker: Could not decode from Base64. 10-16 11:53:59.893 12491 12507 E Corona : Invalid public key 10-16 11:53:59.893 12491 12507 E Corona : java.lang.IllegalArgumentException: com.google.android.vending.licensing.util.Base64DecoderException: Bad Base64 input character at 3: 95(decimal) 10-16 11:53:59.893 12491 12507 E Corona : at com.google.android.vending.licensing.LicenseChecker.generatePublicKey(LicenseChecker.java:118) 10-16 11:53:59.893 12491 12507 E Corona : at com.google.android.vending.licensing.LicenseChecker.\<init\>(LicenseChecker.java:92) 10-16 11:53:59.893 12491 12507 E Corona : at CoronaProvider.licensing.google.LuaLoader.initLicenseChecker(LuaLoader.java:174) 10-16 11:53:59.893 12491 12507 E Corona : at CoronaProvider.licensing.google.LuaLoader.init(LuaLoader.java:144) 10-16 11:53:59.893 12491 12507 E Corona : at CoronaProvider.licensing.google.LuaLoader$InitWrapper.invoke(LuaLoader.java:421) 10-16 11:53:59.893 12491 12507 E Corona : at com.naef.jnlua.LuaState.lua\_pcall(Native Method) 10-16 11:53:59.893 12491 12507 E Corona : at com.naef.jnlua.LuaState.call(Unknown Source) 10-16 11:53:59.893 12491 12507 E Corona : at com.ansca.corona.CoronaLua.dispatchEvent(CoronaLua.java:138) 10-16 11:53:59.893 12491 12507 E Corona : at shared.google.play.services.base.SharedGooglePlayServicesBaseEvent.executeUsing(SharedGooglePlayServicesBaseEvent.java:27) 10-16 11:53:59.893 12491 12507 E Corona : at com.ansca.corona.CoronaRuntimeTaskDispatcher$TaskEvent.Send(CoronaRuntimeTaskDispatcher.java:170) 10-16 11:53:59.893 12491 12507 E Corona : at com.ansca.corona.events.EventManager.sendEvents(EventManager.java:91) 10-16 11:53:59.893 12491 12507 E Corona : at com.ansca.corona.Controller.updateRuntimeState(Controller.java:308) 10-16 11:53:59.893 12491 12507 E Corona : at com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onDrawFrame(CoronaGLSurfaceView.java:425) 10-16 11:53:59.893 12491 12507 E Corona : at com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1623) 10-16 11:53:59.893 12491 12507 E Corona : at com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1378) 10-16 11:53:59.893 12491 12507 E Corona : Caused by: com.google.android.vending.licensing.util.Base64DecoderException: Bad Base64 input character at 3: 95(decimal) 10-16 11:53:59.893 12491 12507 E Corona : at com.google.android.vending.licensing.util.Base64.decode(Base64.java:546) 10-16 11:53:59.893 12491 12507 E Corona : at com.google.android.vending.licensing.util.Base64.decode(Base64.java:474) 10-16 11:53:59.893 12491 12507 E Corona : at com.google.android.vending.licensing.util.Base64.decode(Base64.java:420) 10-16 11:53:59.893 12491 12507 E Corona : at com.google.android.vending.licensing.LicenseChecker.generatePublicKey(LicenseChecker.java:109) 10-16 11:53:59.893 12491 12507 E Corona : ... 14 more 1

Notice all the “Corona” messages being output. I wasn’t seeing anything like that in what you posted.

10-16 11:54:00.243 12491 12491 D AndroidRuntime: Shutting down VM --------- beginning of crash 10-16 11:54:00.243 12491 12491 E AndroidRuntime: FATAL EXCEPTION: main 10-16 11:54:00.243 12491 12491 E AndroidRuntime: Process: com.bendy.onnightmare, PID: 12491 10-16 11:54:00.243 12491 12491 E AndroidRuntime: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 12451000 but found 4242000. You must have the following declaration within the \<application\> element: \<meta-data android:name="com.google.android.gms.version" android:value="@integer/google\_play\_services\_version" /\> 10-16 11:54:00.243 12491 12491 E AndroidRuntime: at com.google.android.gms.common.GooglePlayServicesUtilLight.isGooglePlayServicesAvailable(Unknown Source) 10-16 11:54:00.243 12491 12491 E AndroidRuntime: at com.google.android.gms.common.GoogleApiAvailabilityLight.isGooglePlayServicesAvailable(Unknown Source) 10-16 11:54:00.243 12491 12491 E AndroidRuntime: at com.google.android.gms.internal.ads.zzamu.zzbe(Unknown Source) 10-16 11:54:00.243 12491 12491 E AndroidRuntime: at com.google.android.gms.internal.ads.zzjr.zza(Unknown Source) 10-16 11:54:00.243 12491 12491 E AndroidRuntime: at com.google.android.gms.internal.ads.zzma.zza(Unknown Source) 10-16 11:54:00.243 12491 12491 E AndroidRuntime: at com.google.android.gms.ads.InterstitialAd.loadAd(Unknown Source) 10-16 11:54:00.243 12491 12491 E AndroidRuntime: at CoronaProvider.ads.admob.AdMobAd$3.run(AdMobAd.java:209) 10-16 11:54:00.243 12491 12491 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:751) 10-16 11:54:00.243 12491 12491 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95) 10-16 11:54:00.243 12491 12491 E AndroidRuntime: at android.os.Looper.loop(Looper.java:154) 10-16 11:54:00.243 12491 12491 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6119) 10-16 11:54:00.243 12491 12491 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 10-16 11:54:00.243 12491 12491 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) 10-16 11:54:00.243 12491 12491 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) 10-16 11:54:00.299 602 29511 W ActivityManager: Force finishing activity com.bendy.onnightmare/com.ansca.corona.CoronaActivity 10-16 11:54:00.494 602 12526 I OpenGLRenderer: Initialized EGL, version 1.4 10-16 11:54:00.495 602 12526 D OpenGLRenderer: Swap behavior 2 10-16 11:54:00.807 602 615 W ActivityManager: Activity pause timeout for ActivityRecord{b0be4f9 u0 com.bendy.onnightmare/com.ansca.corona.CoronaActivity t147 f} 1

For the first crash, these seem like the relevant lines:

10-16 11:58:49.849 12660 12675 E LicenseChecker: Could not decode from Base64. 10-16 11:58:49.851 12660 12675 E Corona : Invalid public key 10-16 11:58:49.851 12660 12675 E Corona : java.lang.IllegalArgumentException: com.google.android.vending.licensing.util.Base64DecoderException: Bad Base64 input character at 3: 95(decimal)

This is saying that your key isn’t a valid Base64 string. And possibly that bad character is in position 3 in the string. It’s a decimal value of 95 which is an underscrore (’_’) character. Base64 strings are the digits 0-9, A-Z, a-Z a / and a + sign. I would look there and make sure you have a valid string there. You didn’t share your config.lua with us which is where this key value will be specified.

Your second crash is related to the plugin.google.play.services plugin that I asked you to remove:

10-16 11:58:50.782 12660 12660 E AndroidRuntime: FATAL EXCEPTION: main 10-16 11:58:50.782 12660 12660 E AndroidRuntime: Process: com.bendy.onnightmare, PID: 12660 10-16 11:58:50.782 12660 12660 E AndroidRuntime: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 12451000 but found 4242000. You must have the following declaration within the \<application\> element: \<meta-data android:name="com.google.android.gms.version" android:value="@integer/google\_play\_services\_version" /\> 10-16 11:58:50.782 12660 12660 E AndroidRuntime: at com.google.android.gms.common.GooglePlayServicesUtilLight.isGooglePlayServicesAvailable(Unknown Source) 10-16 11:58:50.782 12660 12660 E AndroidRuntime: at com.google.android.gms.common.GoogleApiAvailabilityLight.isGooglePlayServicesAvailable(Unknown Source)

This string “AndroidManifest.xml does not have the right value. Expected 12451000 but found 4242000” tells me that it’s finding the Google Play Services library which is version 4.242. This is the version of that very old plugin.google.play.servcies that you have to remove. Version 12.451 is the modern version of this plugin, which will be included as a dependency for plugins that need it. 

This plugin also used to be the very old AdMob plugin and you haven’t been clear if you’re trying to use AdMob or not. The current AdMob plugin is a paid plugin: https://marketplace.coronalabs.com/corona-plugins/admob or you can use AdMob through the Appodeal plugin: https://marketplace.coronalabs.com/corona-plugins/appodeal

Google Play changes are some of the things that’s changed significantly since 2015. 

Rob

My config.lua, its neccessary to change the admob plugin ?

application = { showRuntimeErrors = true, content = { fps = 60, width = 720, height = 1280, scale = "letterbox", }, license = { google = { key = "put\_your\_license\_key\_from\_developer\_console", }, }, LevelDirectorSettings = { imagesSubFolder = "Images", } }

If that’s really your key, you will notice there is an underscore at position 3 (Java and C++ based languages start counting at 0). This is an invalid key and it’s crashing your app.

Google Key’s for this look like:

 key = "MIIBIjANBgkqhkiG9w0ABCDEFGHIJK8AMIIBCgKCAQEAoG52hqPR+pZl0bQxtL8ZfiqOOX+AvKoSVXVHpiFQadTbe8TpRfW7D9iI+aBcDeFgHiJGt2EBBF4eWImeytWChRHiV00eSi4zMnsh3j4U3wS8l2suFOvdldWvIL5HslttwUJKpCtFsHIFxU79We5OZQ7X2dzC04Usbj5a280a+j4LBYC8cpHxmsdGHRNwUOmjqsl0K89iNbVjtghNBnzYBScx54AsMW8bJS7Me+WzPJa/4XySvc9K7N17Et+RJ4VqauKX36iFm8XKyk3f9JZUJBCkpqGyPNL/we8tjNiNMz+zm0omKvrhSVwL13ZlzIrw0xzZxVw+UKonVnrrzH9lQIDAQAB"

You get this key from the Google Play site.

Rob

Finally it work, but i compile it with the older version of corona SDK(2015) on windows! 

now i have one problem! a need to put the RGPD  for show ads on europe!

If you are going to deploy to Google Play, you must use build 2018.3326 or later. This the first version of Corona that supports Android SDK level 26 which is required for all submissions to Google Play.

If you’re marketing your app in Europe, you will have to be GDPR compliant. This requires that you use new ad plugins. You also need to use a newer version of Corona for this as well, which means using 2018.3326 or later too. It’s your responsibility to ask the user for permission. Our new ad plugins support the hasUserConsent flag which can be used to get ads that don’t do user tracking.

Rob

Can i switch to the new version? any help please!

Visit:  https://developer.coronalabs.com/downloads/daily-builds/

Find 3326 (or just grab the latest daily build), download the .msi file and run it. This will update your old Corona with the new Corona.

Rob

i know, but if i open and compile my project with corona 2018, he get me the same probleme, crash! 

If you use a modern version of Corona and you have fixed the license key issue in config.lua and you’ve removed the old AdMob plugin and either a) removed your old code that tried to use the old plugin or b) updated to the new AdMob plugin (or implemented Appodeal) then you can’t be having the same problem.

I looked at your marketplace licenses to see if you have bought AdMob or not, and I don’t see a license for it. Appodeal takes some time 

to set up and it doesn’t seem that you’ve had enough time to go through that process.

Until you either completely remove that old AdMob plugin (plugin.google.play.services) or update it to the new paid version, you’re going to have problems.

Have you fixed the license key in config.lua yet?

It’s not going to work until you address these two items.

Rob