Constant string too long

You must Login before you can answer or comment on any questions.


I'm trying to package my latest Android app for distribution, I've never had problems till today. I'm using 1.8.2 and V8.

During packaging I get the following error:

[ERROR] Error(s) compiling generated Java code
[ERROR] C:\Documents and Settings\[User]\My Documents\Titanium Studio Workspace\[app]\build\android\gen\com\[name]\test\ constant string too long
assets.put("app.js", "then 81,060 worth of alpha-numeric characters");
Anyone have any idea on how to resolve this problem?

— asked 4 years ago by Nicholas Thibault
  • I managed to get it working. Had to split some of my larger .js files into smaller chunks. I don't like having so many different files, so hopefully someone knows of a better fix.

    — commented 4 years ago by Nicholas Thibault

  • If it is not one thing, it is another. What I love about a bug like this, is that it doesn't hit you until you are exhausted from getting every last detail right and you're ready to submit to the Android Market/Google Play and BAM! sorry Charlie! You've got ANOTHER workaround and it always hits at some ungodly hour. In my case, I needed to do a production build to test Facebook integration and BAM! no way with 1.8.2 so I'm back to 1.8.1.

    BTW, I looked for about 20 minutes in JIRA and couldn't find anything so it doesn't appear that the developers know about this.

    — commented 4 years ago by Joe Falcone

  • HI Joe!

    As a workarround it may help if you set the property

    <property name="" type="bool">false</property>
    in tiapp.xml.

    The problem is the obfuscation code which was introduced in

    — commented 4 years ago by Dietrich Streifert

  • Show 3 more comments

3 Answers

I've also hit this bug with another big js-File which worked in 1.8.1.

I suspect this is due to the new ability of SDK 1.8.2 to obfuscate the javascript code:

I'll try to add a comment to that issue.

Please add your comments as well and watch that issue.

This also was posted in Q&A in

Your Answer

Think you can help? Login to answer this question!