问题
Worklight version v6.0.0.20130917-1749, Dojo 1.9
When I run the preview of an android project when 'provide library resources' is disabled I get the following errors:
"NetworkError: 404 Not Found - http://10.99.8.72:10080/Klappr/apps/services/preview/Klappr/android/1.0/default/main.js"
main.js
"NetworkError: 404 Not Found - http://10.99.8.72:10080/Klappr/apps/services/preview/Klappr/android/1.0/default/typematic.js"
typematic.js
In android this results in a 'scriptError:21'.
I copied all necessary files from the toolkit to my www-folder.

main.js and typematic.js are never required in my js-files. I don't know why it still searches for it, and not in my www/dojo folder, but instead in the android/1.0/default folder.
Here you see that typematic.js is included. Still I get the error.

I updated Worklight to 6.0.0.1 fix, and still get the error.
回答1:
Using the Worklight project Fred emailed me I could see the mentioned errors as well.
I then:
- Removed the "dojo" and "dijit" folders from the www folder
- Re-added them from the dojoLib folder in the workspace
- Re-built and deployed the application
- Previewed via Worklight Console
The errors from before are gone and I could now pass the "splash image" and see the actual app.
I do not think this is related to "Require Library Resources", but to ... something, else.
When looking at the dev tools console, there are now all sort of other errors, but I suspect those are due to dumping the entirety of the dojo and dijit folders into the www folder, and could use some optimization and fixing, but the actual hurdle mentioned in the question is lifted.
http://i.stack.imgur.com/UF9L4.png

来源:https://stackoverflow.com/questions/19859321/worklight-project-searches-for-main-js-and-typematic-js-when-provide-library-re