Unable to build after updating

My app was entirely finished besides the addition of icons, and consistently compiled/ built successfully for Android when I was using the last public build of Corona (the 2018 one).

However, I decided to update to the latest daily build, and since then, I have not been able to build a single one of my projects that had worked fine with the previous update.

Everything still runs fine in the Corona simulator, but as soon as I attempt to build I get the error message “failed to build with an exception” in the console and the explanation for what went wrong is “could not initialize class org.codehaus.groovy.reflection.ReflectionCache”

I can send in screenshots if necessary.

I searched through the forums and found that many people had experienced a similar issue, but I couldn’t find a working solution, as most of the links mentioned had expired.

Is there any way to fix this?

I am working on Windows, and I already checked and made sure my JDK was updated.

Are you using Solar2D builds or Corona builds? Can you share the version? If you are using Solar2D builds, which plugins are you using? Also, have you checked the free directory(https://plugins.solar2d.com/) or https://solar2dmarketplace.com/ to see if that plugin is available there?

I think I’m using Corona builds but I’m not sure. I installed the most recent daily build of Corona first, and that’s when I started having issues. After that, I tried installing the latest update for Solar2D as listed on the forums, and encountered the same problems.

The only plugin I’m using is AdMob, which worked fine when I used it with the 2018 version. I installed it off the Corona market.

I’m not on my desktop right now so I don’t have immediate access, but I can get you the version numbers off there if you need them.

Also, if it’s any help, it’s using the newer build method that involves Gradle instead of the old build method, which seems to be where the issues are coming from.

The problem may probably be related to the JDK version. If you are using the latest JDK, I suggest switching to jdk-8u131. Docs could use an update for that matter. Can you try this and let me know if it works so that I can send a request to update the docs?

1 Like

Where can I download that from?

Can you try JDK 11 first and if it doesn’t work, try JDK 8?

I’ll try that first thing tomorrow morning.

Should I switch back to a Corona version again too since I’m using a plugin from the Corona marketplace?

If you’re only using Admob, you don’t need to go back to Corona builds. If you look at the links above you’ll see that Admob is available in the free plugins directory.

OK, is it the same version of AdMob as well?

Most likely, yes.

Have you tried installing JDK11? Which version worked for you?

JDK11 failed, I’ll try 8

Do I use the x86 version or the x64?

This depends on your machine. https://www.wikihow.com/Check-if-Your-Computer-Is-64-Bit

It’s 64 bit.

Also, is it problematic that I currently have multiple versions of Java installed due to repeatedly switching the update number?

The Corona builder is also currently stuck on a build that I tried to cancel after I realized it wasn’t working. Will there be any negative effects if I manually close the program?

edit
It eventually cancelled properly, and I tried again and the app built successfully.

Thanks for all the help, it looks like everything’s working again!

Should be good to publish by the end of the night.

1 Like

How did you solve the problem?
I would also like to migrate to Solar2d but I don’t have the courage in the absence of a precise tutorial.
Have you logged out of your CoronaLabs account?
Do you use JDK 8 in the end?
Can the two systems, Coronalabs and Solar2D coexist?
Are you on windows or on mac?

Thank you :wink:
Renato

Using Windows here. Go ahead and download the latest Solar2D release(.msi file), double click to install. All I did was that and it works now.

1 Like

I’m on windows, I used the newest Solard2D build, and I just tried recommended JDKs until it worked. I’m fairly sure it was JDK 8 that worked in the end.

I’m fully published, everything works, and ads are loading in nicely. However, I’m not receiving any user metrics on AdMob.

I tested it a bit and I had a few friends try it out as well, and they all said the ads worked as intended too.

However, the request count on the AdMob dashboard remains unchanged.

This probably has to do with the fact that it was recently published (the few downloads it has aren’t showing up on the play console either), but I figured I should make sure it doesn’t have to do with the version of AdMob I’m using or the fact that I’m not running firebase.

Their troubleshooting page said that firebase was optional though, so I’m not too sure what’s up.

If you can see live / production ads correctly I don’t think it would matter that much to Google. Like you said, you may want to wait up a little before those numbers show up.

1 Like