Android Game loads with background but nothing else.

I completed my simple game in solar2D and everything works within the simulator (for all of the simulator device screen sizes) but I went to deploy and test my app on the android beta store and the only thing that loaded was the background with none of the images or text… I tested with multiple devices and it was the same way on all of them.

I’m fairly new to developing with corona/solar2D so any advice would be greatly appreciated. I’m going to check all file-paths and make sure they are case sensitive (they should be). The only other things I think it could be would be that the background image populated in front of the buttons and text (which shouldn’t happen… but maybe), or maybe it’s not fitting to the screen like it should be.

Isn’t the simulator supposed to be very similar to the actual device runtime?

You don’t need to upload your app to the android store in order to test it on a device.

But I think that your guess is right, maybe you are having some case-sensitive issues. You can prevent this from happening creating a case-sensitive volume for your projects, so both, the devices and the simulator, are going to trigger an error for wrong paths.

The simulator runs exactly the same as your devices, but the environment is different. It is not android nor iOS. If you are using plugins, some of them (like IAP and Ads) have OS specific behaviors, causing some errors when you first run it on a device.

But well, debugging this is not so hard, you can build you app and copy it to your device using the Simulator (You can also check the Live Build box for a dynamic testing). If you keep your device plugged in without closing the build prompt message, you will see your prints and error messages in the console.

Thanks for your response! I haven’t looked at this game in a few months and overlooked that all of the buttons and text are actually scripted, such as text objects and rectangles for the buttons, they are not external files (such as images). So it can’t be a file path error.

The background consists of 3 different rects with a gradient applied, I’ve created a color transition effect with a listener bouncing their alpha values. The background rectangles appear but not the button rectangles. Could the background somehow be getting in front of the buttons, even though it doesn’t behave that way in the simulator?

Also, I know I am supposed to be able to compile directly to my android but for some reason, my mac wouldn’t detect the android phone and I was forced to publish the beta test group version of the app. I will keep trying to fix the connectivity issue.

Did you enable developer mode and USB debugging on your phone? Otherwise I guess the problem may be the cable.

I can’t imagine any possible scenario where the the background could go to the top only on devices. But case-sensitive issues could still happen with requires, like require("Widget") instead of require("widget")

If you still can’t solve your issue, you can post here some of your code so I (Or someone else) can help you finding the issue. :slight_smile:

It was a problem with the cord, I picked a new one up and debugging efficacy has increased exponentially lol.

The problem ended up being with the non-existent JSON file on the android phones. Everything that was associated with that function just wouldn’t populate on the screen! Got it all working. Thank you. This helped a lot