This is a migrated thread and some comments may be shown as answers.

Errors When Starting Device Simulator

1 Answer 102 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Troy
Top achievements
Rank 1
Troy asked on 06 Jan 2014, 06:27 PM
Hi everyone.

I'm creating a new mobile project using Icenium. When I start the device simulator, I get the following errors:

Uncaught ReferenceError: cordova is not defined    about:blank:1
Uncaught TypeError: Cannot read property '0' of undefined    kendo.mobile.min.js:17

Why do I get these errors?

Here is the markup from my header.

<!DOCTYPE html>

<html>
<head>
<title></title>

<!--Style sheets.-->
<link href="styles/kendo/kendo.mobile.all.min.css" rel="stylesheet" />
<link href="styles/app.css" rel="stylesheet" />

<!--Scripts.-->
<script src="cordova.js"></script>
<script src="scripts/kendo/jquery.min.js"></script>
<script src="scripts/kendo/kendo.mobile.min.js"></script>
<script src="scripts/app.js"></script>
</head>

1 Answer, 1 is accepted

Sort by
0
Accepted
Steve
Telerik team
answered on 07 Jan 2014, 12:19 PM
Hi Troy,

As per your support ticket, here are our findings on your questions:
  • We're not able to reproduce the "cordova is not defined" error. Open the Debugger in the simulator, go to console and identify on which line does this error occur.
  • The "Cannot read property '0' of undefined" error you get is due to you trying to load the Flat skin while the Application is still initializing. To fix this, pass the skin as Application configuration option on init, like this (additionally the skin name is case-sensitive):

    app.application = new kendo.mobile.Application(document.body, { skin: "flat" });

Regards,
Steve
Telerik
You've missed the Icenium Visual Studio Integration keynote? It has been recorded and posted here.
Looking for tips & tricks directly from the Icenium team? Check out our blog!
Share feedback and vote for features on our Feedback Portal.
Tags
General Discussions
Asked by
Troy
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or