Disable asset compression with Android aapt

Bibtex Phd Thesis Fields Trying to embed all the assets resources into my final apk was not so easy as I tought.. at least using the ADT Eclipse plugin for building project.
In fact, using AssetManager.openFd to return to the C++ code a FileDescriptor does not work with compressed sources.
When aapt compile the resources into the apk file it compress by default all the files which extensions are not recognized and those which recognize as text files.

These are the extensions not compressed:

http://www.hoerkomm.de/?help-writing-newspaper-obituary Help Writing Newspaper Obituary

1
2
3
4
5
6
7
8
9
<br />
static const char* kNoCompressExt[] = {<br />
".jpg", ".jpeg", ".png", ".gif",<br />
 ".wav", ".mp2", ".mp3", ".ogg", ".aac",<br />
 ".mpg", ".mpeg", ".mid", ".midi", ".smf", ".jet",<br />
 ".rtttl", ".imy", ".xmf", ".mp4", ".m4a",<br />
 ".m4v", ".3gp", ".3gpp", ".3g2", ".3gpp2",<br />
 ".amr", ".awb", ".wma", ".wmv"<br />
};<br />

Do Your Homework Mara Landis I was looking into the .project file of my Eclipse project but it seems that changing things inside that file ( like values into the tag ) does not affect the builder.

The first thing I tried was to remap the aapt executable using a shell script ( and renaming the original aapt file into _aapt ):

Dissertation Research And Writting

1
2
3
4
5
6
7
8
9
10
11
12
<br />
#!/bin/bash</p>
<p>strParams=""<br />
CWD=’dirname $0’</p>
<p>for i in $@; do<br />
   if [ $i = "-S" ]; then<br />
      strParams="$(echo $strParams) -v -0 \"\""<br />
   fi<br />
   strParams="$(echo $strParams) $i"<br />
done</p>
<p>tool="$CWD/_aapt $strParams"<br />
$tool 1>&2<br />

In fact, when building the project in eclipse I could see the whole output, but the files are still being compressed, even if I call the same command in a shell the assets aren’t compressed.
I haven’t yet find a solution so for the meantime I decided to use ant to build my project overriding the default “-package-resources” target in this way:

Different Services Essay

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<br />
    <target name="-package-resources"><br />
        <echo>Packaging resources</echo><br />
      <echo>${asset.absolute.dir}</echo><br />
        <aapt executable="${aapt}"<br />
                command="package"<br />
            verbose="${verbose}"<br />
                versioncode="${version.code}"<br />
                manifest="AndroidManifest.xml"<br />
                assets="${asset.absolute.dir}"<br />
                androidjar="${android.jar}"<br />
                apkfolder="${out.absolute.dir}"<br />
                resourcefilename="${resource.package.file.name}"<br />
                resourcefilter="${aapt.resource.filter}"><br />
            <res path="${resource.absolute.dir}" /><br />
            <nocompress /></target></p>
<p>    <br />

In this way the project is being compiled correctly and all my assets are embedded not compressed!

Best Retirement Plans For Small Business Owners P.S. my claim token is: 7C8AATS7Q5A3

Update your app VERSION using ant

Research Project Proposal Ideas This is just a quick tip in case someone needs it. Maybe when you compile your flash application or your swc library you want to automatically update the “ http://mzoologia.uprrp.edu/?purchase-thesis-paper Purchase Thesis Paper VERSION” number too without do it manually every time.

This is the way I do. In the “compile” task I’ve added a depends link to this ant task:

Reviews On Cialis Daily <target name="update-version"> <propertyset id="tdate"></propertyset> <tstamp> <format property="tdate" pattern="yyyyMMdd"/> </tstamp> <buildnumber file="build.number"/> <echo>updating version to current datetime: ${tdate}</echo> <replaceregexp byline="true"> <regexp pattern="public static const BUILD_DATE: String = \'([0-9]+)'"/> <substitution expression="public static const BUILD_DATE: String = '${tdate}'"/> <fileset dir="src/it/sephiroth/somestuff"> <include name="Library.as"/> </fileset> </replaceregexp> <replaceregexp byline="true"> <regexp pattern="public static const BUILD_NUMBER: String = \'([0-9\.]+)'"/> <substitution expression="public static const BUILD_NUMBER: String = '${build.number}'"/> <fileset dir="src/it/sephiroth/somestuff"> <include name="Library.as"/> </fileset> </replaceregexp> </target>

The 2 optional tasks I’ve used are: BuildNumber task and ReplaceRegExp Task. In this way every time I do an ant compile, it will update my build number and modification date.
What this task does is find this 2 lines in my Library.as file:

Best Custom Research Paper Site public static const BUILD_DATE: String = ‘20100131’;

and

http://www.sv-virgo.nl/?custom-written-essays Custom Written Essays

How To Write A Graduate School Admissions Letter public static const BUILD_NUMBER: String = ‘5’;

then replace the BUILD_DATE const with the current date and the BUILD_NUMBER with an incremental build number. After being executed the first time, ant will also create a new file in your directory called “build.number” with the latest build number int.

mxmlc NullPointerException crash

http://www.ashoksom.com/companies-writing-personal-statements/ Companies Writing Personal Statements Today I was getting crazy to find out why Flex didn’t want to compile my application.. Clicking on compile it started suddenly to give me an internal compile error and nothing else. So i tried to compile with the mxmlc from a console just to see the error log and the outpuw was:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
java.lang.NullPointerException
at macromedia.asc.semantics.FlowAnalyzer.evaluate(FlowAnalyzer.java:891)
at macromedia.asc.parser.BinaryExpressionNode.evaluate(BinaryExpressionNode.java:38)
at macromedia.asc.semantics.FlowAnalyzer.evaluate(FlowAnalyzer.java:890)
at macromedia.asc.parser.BinaryExpressionNode.evaluate(BinaryExpressionNode.java:38)
at macromedia.asc.semantics.FlowAnalyzer.evaluate(FlowAnalyzer.java:891)
at macromedia.asc.parser.BinaryExpressionNode.evaluate(BinaryExpressionNode.java:38)
at macromedia.asc.semantics.FlowAnalyzer.evaluate(FlowAnalyzer.java:890)
at macromedia.asc.parser.BinaryExpressionNode.evaluate(BinaryExpressionNode.java:38)
at macromedia.asc.semantics.FlowAnalyzer.evaluate(FlowAnalyzer.java:962)
at macromedia.asc.parser.ListNode.evaluate(ListNode.java:27)
at macromedia.asc.semantics.FlowAnalyzer.evaluate(FlowAnalyzer.java:5859)
at macromedia.asc.parser.LiteralXMLNode.evaluate(LiteralXMLNode.java:28)
at macromedia.asc.semantics.FlowAnalyzer.evaluate(FlowAnalyzer.java:3087)
at macromedia.asc.parser.VariableBindingNode.evaluate(VariableBindingNode.java:48)
at macromedia.asc.semantics.FlowAnalyzer.evaluate(FlowAnalyzer.java:962)
at macromedia.asc.parser.ListNode.evaluate(ListNode.java:27)
at macromedia.asc.semantics.FlowAnalyzer.evaluate(FlowAnalyzer.java:2897)
at macromedia.asc.parser.VariableDefinitionNode.evaluate(VariableDefinitionNode.java:32)
at macromedia.asc.semantics.FlowAnalyzer.evaluate(FlowAnalyzer.java:4629)
at macromedia.asc.parser.ClassDefinitionNode.evaluate(ClassDefinitionNode.java:86)
at macromedia.asc.semantics.FlowAnalyzer.evaluate(FlowAnalyzer.java:938)
at macromedia.asc.parser.ArgumentListNode.evaluate(ArgumentListNode.java:28)
at macromedia.asc.semantics.FlowAnalyzer.evaluate(FlowAnalyzer.java:750)
at macromedia.asc.parser.SetExpressionNode.evaluate(SetExpressionNode.java:39)
at macromedia.asc.semantics.FlowAnalyzer.evaluate(FlowAnalyzer.java:580)
at macromedia.asc.parser.MemberExpressionNode.evaluate(MemberExpressionNode.java:31)
at macromedia.asc.semantics.FlowAnalyzer.evaluate(FlowAnalyzer.java:1273)
at macromedia.asc.parser.ExpressionStatementNode.evaluate(ExpressionStatementNode.java:33)
at macromedia.asc.semantics.FlowAnalyzer.evaluate(FlowAnalyzer.java:4407)
at macromedia.asc.parser.ClassDefinitionNode.evaluate(ClassDefinitionNode.java:86)
at macromedia.asc.semantics.FlowAnalyzer.evaluate(FlowAnalyzer.java:2577)
at macromedia.asc.parser.ProgramNode.evaluate(ProgramNode.java:63)
at flex2.compiler.as3.Compiler.analyze2(Compiler.java:436)
at flex2.compiler.mxml.InterfaceCompiler.analyze2(InterfaceCompiler.java:337)
at flex2.compiler.mxml.Compiler.analyze2(Compiler.java:130)
at flex2.compiler.API.analyze(API.java:2360)
at flex2.compiler.API.analyze(API.java:2275)
at flex2.compiler.API.batch2(API.java:337)
at flex2.compiler.API.batch(API.java:1025)
at flex2.compiler.API.compile(API.java:1211)
at flex2.compiler.API.compile(API.java:1114)
at flex2.tools.Compiler.main(Compiler.java:222)

Wow!!
So, how can I find the problem? I can’t find any useful information from this log..
For this reason I had to remove portion of code from my mxml and from all the imported packages.. 2 hours of “debugging” gave me the solution!

Help With Dissertation Writing Review A syntax error in a declaration of an XMLList was the problem!  Fixed the line also the compiler started to run again with no problems.

The Letter Of Application This is a portion of mxml code to reproduce the problem:

1
2
3
4
5
6
7
8
9
10
11
;


< ![CDATA[
private var uuid:String = "";
private var menubarXML:XMLList =
<>
<menuitem data=uuid>
</menuitem>
<>;
]]>