Software Archive
Read-only legacy content
17061 Discussions

Blank White Screen

Treyson_A_
Beginner
625 Views

So building my first app with the Intel XDK. Everything was going great until I went to actual device testing (Not using the preview app or the emulator). No matter if the build is for iOS or Android it returns a blank white screen after the app is opened. Any advice or fixes would be greatly appreciated!

0 Kudos
3 Replies
PaulF_IntelCorp
Employee
625 Views

Seems to be a rash of this going around, but I have yet to hear from anyone what, if anything, has resolved the issue, so I'm speculating that you are trying to call some intel.xdk namespace functions but do not have the intelxdk.js file referenced in your index.html file... If you are using those functions (which we recommend you do not use, as they are going to go away, use the equivalent Cordova functions, instead) you need to include that intelxdk.js file before the cordova.js reference.

0 Kudos
Treyson_A_
Beginner
625 Views

I tried your suggestion and it is still giving me a white screen of death. I have attached a Zip file of the project. Any help is greatly appreciated!

0 Kudos
PaulF_IntelCorp
Employee
625 Views

Please follow the instructions on this doc page to add a third-party plugin: https://software.intel.com/en-us/xdk/docs/adding-third-party-plugins-to-your-xdk-cordova-app -- this plugin is not being included as part of your app. You will see it in the build log if it was successfully added to your build.

You have selected every built-in plugin, on the Projects tab. Please do not do this; include only the plugins you actually require. Doing so only makes your app larger and can result in difficult to resolve conflicts. I recommend that you add plugins only as you need them. In particular, it would be easier to debug your app by sticking to the basics, with only the plugins you require, to get a working basic app; then add small amounts with each success.

Try to make all your resource files local in the project, for example, you are loading in a font over the network (<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">) which is not a good thing to do. What happens if the network is disabled on your device? Or, if the network is slow. Or, in this case, the resource is unreachable... (see the image attached). Please see this document for some guidelines on how to build a Cordova app: http://cordova.apache.org/docs/en/4.0.0/guide_next_index.md.html#Best%20Practices

Please also read this doc page for an overview on debugging: https://software.intel.com/en-us/xdk/docs/intel-xdk-debug-and-test-overview. In particular, the part about using remote CDT. I got the attached image using this technique. Using this technique is how I found most of the issues (stated below) regarding your app.

Screen Shot 2015-05-26 at 2.30.17 PM.png

Adding "maxcdn.bootstrapcdn.com" to the domain white list fixed one issue, but I do not recommend using this approach to fix your problem. You need to download that css file and include it in your project to avoid the issues I described above regarding network problems.

Also, you were waiting on the intel.xdk.device.ready event, which has been deprecated and will only be present in a Cordova build if you include the XDK "base" plugin. You should use the Cordova "deviceready" event or use the "app.Ready" event that is issued by the init-dev.js file, which unifies these events. In addition, because you did not have any of the XDK plugins included, the references to intel.xdk functions all failed. Unfortunately, App Preview and the Emulate tab include these by default, even if they have not been selected in the Plugins section of your Projects tab.

Once you fix all of the above, that brightness plugin gets in the way (also fails as an undefined), because the plugin does not exist in your app and, therefore, the API calls you are trying to make will not work. I did not go any further than this, because I think this is sufficient information for you to finish the job yourself.

Also, it is very helpful to use the various linting tools that can be added to the Brackets editor to review any syntax issues in your HTML, CSS and JS files. Go to the "File > Extension Manager..." menu item and add the following extensions:

  • JSHint
  • CSSLint
  • HTMLHint
  • XLint for Intel XDK

Then, review your source files by monitoring the small yellow triangle at the bottom of the edit window (a green check mark indicates no issues).

0 Kudos
Reply