IBM Worklight 6.0 - Unable to run sample hybrid worklight app using dojo toolkit for android environment on avd?

Solution 1:

Let's back up just a bit. In nsand's post in regard to the Console View, what he was trying to determine is if your application is using the new Dojo Library Server that was introduced in 6.0. In short, for 6.0, your application only has within it Dojo Mobile Layers. Any other resources it needs, e.g. translations, dijit widgets, are being served from the server. You can read about it in the 6.0 Information Center: http://pic.dhe.ibm.com/infocenter/wrklight/v6r0m0/index.jsp?topic=%2Fcom.ibm.rad.worklight.doc%2Ftopics%2Fcdojolibprjsetupwl.html

If you follow nsand's steps for unchecking Provide Library Resources, this turns off your application's access to the Dojo Library/Server. All of its Dojo needs must be handled by the Dojo Mobile layers, or you had to have copied the needed resources into the project.

So Step 1: Verify your application works in the Mobile Browser Simulator with Provide Library Resources checked. If the Console log is showing resources being served from the server, then these have to be copied to your application before deploying to AVD or a device

Step 2: After you think you have all Dojo/resources within your project, uncheck Provide Library Resources and test it again in MBS. If it fails in MBS, then something is missing in your application that is in the library/server. You can check Provide Library Resources and retest to see if it shows you what that is. Not all resources are shown, e.g. if there's a missing CSS file.

Let us know if that helps you find the problem. If you uncheck Provide Library Resources and it works fine in MBS but fails on the device, then we need to look elsewhere.

(note: there is a defect that prevents you from using the Dojo Library/Server with AVD or on your device. This will be fixed soon. None the less, using the Dojo Library/Server is a development time concept. Before you move to production, you app needs access to all of the necessary resources w/o them being served from the Dojo Library/Server in Studio).

Solution 2:

In addition to including the *_ROOT.js files, you may also need to remove the development configuration from the application. To do this, open the Console view (Window > Show View > Other... > Console). From the Console view, click the Open Console button and choose Dojo Library Requests from the list. From the Dojo Library Requests console, click the View Menu (the triangle in the toolbar), and uncheck Provide Library Resources. After this, build and deploy the application environment to your emulator or device.