[TIMOB-11238] Android: local webviews fail with removed js files when packaged for android
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-08-14T18:51:21.000+0000 |
Affected Version/s | Release 2.1.2, Release 2.1.3 |
Fix Version/s | Release 3.1.0, 2012 Sprint 23 Core, 2012 Sprint 23 |
Components | Android |
Labels | SupportTeam, core, module_webview, qe-manualtest, qe-port |
Reporter | Varun Joshi |
Assignee | Bill Dawson |
Created | 2012-10-03T00:22:03.000+0000 |
Updated | 2014-08-14T18:51:21.000+0000 |
Description
Issue
When the app is packaged for distribution, .js files are removed. This appears to be causing problems with the javascript files that are referenced by the local html files. This works fine with an iOS app when packaged. The js files are missing from the package but seem to load and execute with no issues.Workaround
The javascript files can be renamed with .jsx extension and this will disable them from getting removed from the app package.Steps to Reproduce
1. Run the attached test project. 2. When launched in android emulator or on device, the test.js file work update the html file correctly. The apk file still has the test.js resource. 3. When packaged for distribution the test.js file is removed and the html file does not get updated. 4. When the test.html is modified to reference test.jsx, the testcase succeedsAttachments
File | Date | Size |
---|---|---|
WebViewWithJSTest.zip | 2012-10-03T00:22:03.000+0000 | 2362489 |
Also happens in earlier SDK versions. Tested in 2.1.2.GA and 2.0.1.ga2.
PR ready: https://github.com/appcelerator/titanium_mobile/pull/3407
Verified on: Studio: 3.0.1.201212181159 SDK: 3.1.0.v20130114171802 Android Device: Samsung Galaxy Note (v2.3.6)
adding port labels