Jump to content

Exporting to Android: Black Screen?


Wolfsbane
 Share

Recommended Posts

Heya Panda's,

Tried to export to Android. It built the Apk, I manually copied that onto my phone, and then installed it on my phone. I opened it. It shows the Panda splash screen for a second (I haven't done a custom splash screen) then that disappears, and I have nothing but a black screen.

Did I do something wrong?

I use some ES6 code in my game (but my understanding is that it's transpiled into ES5 on build).

This is my first attempt at concerting a non-trivial app from Javascript to Android, so would accept any tips on what process I would go through to figure out what's going on? The build process is a bit of a black box at the moment, so I'm unsure how to approach this.

Cheers,

D

 

Link to comment
Share on other sites

The fix for this was removing using the ES6 style syntax of using let for variables, and replace them all with ES5< style var

@enpu, I thought from this post, that when Panda compiled, it went from ES6 to ES5?

Probably the recommended standard for Panda devving should be ES5 until PhoneGap supports ES6 types.

 

Link to comment
Share on other sites

I have done some research on this one.

When you export to mobile that is not release/distribution build, the game code doesn't get minified and the code gets transpiled into ES5 compatible code only when minified. I did have minifying disabled on debug builds, because it's easier to debug the code that way. When you export unminified code to Android without Crosswalk, it depends on your devices webview if it supports ES6 or not.

I have added new option "Minify debug builds" to settings, which is turned on by default. This will mean that all builds are minified and transpiled to ES5, but you can also disable it for more debugging friendly code.

1231335873_ScreenShot2018-09-04at8_45_51.png.033bb19ced1165b6885d5ca69ee310fa.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...