Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11238] Android: local webviews fail with removed js files when packaged for android

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-08-14T18:51:21.000+0000
Affected Version/sRelease 2.1.2, Release 2.1.3
Fix Version/sRelease 3.1.0, 2012 Sprint 23 Core, 2012 Sprint 23
ComponentsAndroid
LabelsSupportTeam, core, module_webview, qe-manualtest, qe-port
ReporterVarun Joshi
AssigneeBill Dawson
Created2012-10-03T00:22:03.000+0000
Updated2014-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 succeeds

Attachments

FileDateSize
WebViewWithJSTest.zip2012-10-03T00:22:03.000+00002362489

Comments

  1. Varun Joshi 2012-10-03

    Also happens in earlier SDK versions. Tested in 2.1.2.GA and 2.0.1.ga2.
  2. Bill Dawson 2012-11-09

    PR ready: https://github.com/appcelerator/titanium_mobile/pull/3407
  3. Satyam Sekhri 2013-01-22

    Verified on: Studio: 3.0.1.201212181159 SDK: 3.1.0.v20130114171802 Android Device: Samsung Galaxy Note (v2.3.6)
  4. Lokesh Choudhary 2014-08-14

    adding port labels

JSON Source