Android :: Speed Up Builds On Large Projects - Renaming PNG
Sep 16, 2010
I ran into a problem of slow builds and thought I'd share the solution. I'm porting an iPhone app to Android, and as soon as I added the images to the project (400+ pngs), build time went from about 5 seconds to about 40 seconds. This is on a new machine, quad core i7, 8GB ram. The resource processor (aapt) was to blame. Every time I made a change to a layout xml file and hit save - bam, wait 40 seconds. After running aapt in verbose mode, it was obvious what was happening - aapt does png optimization every single time. Optimization is slow, and aapt only used one core. So it makes sense to turn this optimization off. Just run optipng once, no need to optimize every build or every time I save a layout xml file.
So how do you turn png optimization off? You can't. There is no Eclipse setting, no command line option for aapt. Digging around the aapt source, I noticed something funny though - it only optimizes images in the "drawable" folders that end in ".png". http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;...
Solution: rename all the pngs to end in uppercase ".PNG". Then aapt simply copies the files without optimizing. My build time is back to 5 seconds!
(Caveat: this won't work for nine-patch files - they still need to end in lowercase ".9.png".)
View 2 Replies
Aug 17, 2010
When I test my app, I notice that after some use it has built up a fairly large cache of several Mb. I see this when I go to Menu-
View 9 Replies
View Related
Aug 9, 2010
I have a legacy application and need to split it into a library project (common code) and two application projects (paid and free applications). I don't use Eclipse for development, and also don't use Ant builds provided (generated) by Android SDK (there are several reasons for that: different project directory structure, unit tests integrated into the build, integration with CruiseControl, automatic builds numbering etc), but use our custom build files instead.
I need to modify my Ant builds to make them build my applications projects that refer my library project. I looked into sample application and Ant builds shipped with SDK, but didn't understand how it is done. I saw that library project contains "libs" directory and "default.properties" file with "android.library" property set to "true". I saw that applications project contains "default.properties" file with "android.library.reference.X" property set to library project directory value. But I didn't find any reference to these properties in the Ant builds (project Ant build file, and Ant builds shipped with SDK). Just placing these files into application/library project directories doesn't help, i.e. SDK tools doesn't interpret them.
My guess is that this is performed by com.android.ant.SetupTask, but I'd like to know how it is performed. My build is set of targets that call (using exec) Android SDK tools: appt, dx, apkbuilder and so on. So I'd like to know which command line parameters I need to use to make, lets say, appt tool to merge resources?
View 2 Replies
View Related
Oct 23, 2009
I want make it support multiple screens(small,normal and large).I am 100% sure the all of layouts are working perfectly now, but large screen,the problem is that all XML files of layouts in layout-large can't load,The platform always load default XML file(these are under layout folder) at large screen environment.
View 4 Replies
View Related
May 19, 2010
Firefox is releasing nightly builds of their mobile browser, fennec.I can post them here if no one objects (if it's a problem let me know and I can remove them).I have not had the time to try this out and won't until later tonight, however from what I hear it is much improved versus the pre-pre alpha that was released a couple weeks ago.
View 3 Replies
View Related
May 25, 2009
I use ant to do release builds, and eclipse to do all my debug builds. With the new 1.5 sdk, my build.xml overides the resource-src target in order to perform some additional tasks, and it then depends on android_rules.resource-src to get the proper toolchain behaviour.This works well for ant, but eclipse doesn't seem to know where android_rules comes from (not surprising since it is dynamically imported via code), and thus says there is an error in the file. This in turn stops the entire android project from building. So I need to either somehow get eclipse to parse the build.xml properly, or better still, get eclipse to ignore the build.xml altogether since build.xml takes no part in the eclipse build.
View 8 Replies
View Related
Feb 25, 2010
I have a Android project for SDK1.5 and now I want to convert it for SDK2.1 with some constant changes for the UI. Should I create a complete new Project or the existing project can be manipulated for including the lastest changes. I'm using Eclipse for Development.
View 1 Replies
View Related
Sep 12, 2010
Does anyone know how to disable asset compression in eclipse builds? In other words, how to cause the -0 flag to be set on aapt?This is in order to put in a >1MB asset file, which requires compression to be turned off.
View 4 Replies
View Related
Mar 7, 2009
I notice that there's been a bit of controversy in the last couple of days about off-topic posting on this list. As the list home page says, it is intended to be a place to "Discuss developing Android applications using the Android framework". While I find the talk about the Market and wider issues very interesting, I do think it would be better placed on the -discuss list, so that this list can be more focussed on technical issues to do with developing using the SDK.
I wonder if the reason why this list attracts a lot of off-topic stuff is the name? I suspect many people don't see the description and just interpret "android-developers" to be for discussion of issues affecting developers. Perhaps if it was named "android-sdk" (to match the new android-ndk list), that would improve things?
View 5 Replies
View Related
May 2, 2010
is there a way i can rename the app "adfree". I have another app which prompts with an error message that it wont open if I have "adfree" installed. I actually want to rename adfree and one more app. I am a root user and have a droid... thanks for suggestions and feedback
View 2 Replies
View Related
Oct 21, 2009
I am trying to do an update to an app that was released under 1.0 about a year ago. When it was released, I used the package naming convention: "com.android.myApp". At the time, I thought this was the correct naming convention. In retrospect, this is not the case. The AndroidMarket does not accept new apps with "com.android" package names, so I am assuming the way I did it is frowned upon/disallowed. So my question is two-fold. #1: What is a correct method for selecting package names? I have started using a convention "com.myAppClass.appname". Where "myAppClass" is a arbitrary name that applies to a group of related apps and "appname" is the specific application (e.g. "com.mycategory.appDemo" and "com.mycategory.appFull"). Is this right? #2: What do I do about the app already released as a "com.android" package? My assumption is to recreate it using the above convention. What will the effect be on users who want to upgrade the application through the market or will the market even accept an upgrade version using a different package name?
View 3 Replies
View Related
Jun 17, 2010
i have to change the name of a jpg file , for that i have written the following code sdcard = Environment.get External StorageDirectory(); from = new File(sdcard,image Path. sub string ( 8). toString()); to = new File(sdcard, "/DCIM/RoseVille_"+Info.getText() +"_"+Amount.getText () +"_"+timeStampFormat.format(n ew Date())+".jpg");
View 3 Replies
View Related
Jun 25, 2010
So I've tried 2 builds so far Koush's vanilla build and the Sapphire build and I've run into the same problem on both: whenever I login to Facebook, I no longer get the option to sync contacts. I'm curious as to whether this is a problem I'm having exclusively, or if it's something other people are running into too, and if anyone has found a way to make it work.Options to sync don't exist at all for me. When I go to settings in the Facebook app it normally would show a menu option for syncing, but on 2.2 I get no option. And when I go to the Accounts menu selection in system settings, I can select Facebook as an account to add but I get bounced back to the accounts list without being able to actually add an account.
View 1 Replies
View Related
Nov 13, 2009
I have modified a sample app, and it works fine. When I rename the package though, it force closes. I have modified the package name in all the .Java files, as well as the manifest, in addition to the physical directory structure. I've even tried to create a project from scratch and copy the relevant code in. Any ideas what could be causing this? Am I missing something?
View 5 Replies
View Related
Sep 13, 2010
I have an Android project created in eclipse.I want to modify the package name and application of the project.How to do that in eclipse?
View 3 Replies
View Related
Aug 11, 2010
Any reason Cricket internet doesn't work on Froyo builds? I have flashed all of them, and after flashing the 'cricket internet V9' it won't connect. If I flash back to a 2.1 ROM, it works. What gives? It's really annoying because I want to run KaosV27, but can't without 3g.
View 2 Replies
View Related
Jul 16, 2010
I am trying to create a custom boot animation and I have been following this tutorial ([Ref Tutorial] Changing the boot animation screen on google builds - xda-developers) but I can seem to be able to find the system folder. I am using take5 ROM but when I unzip it its md5 file, not a bunch of folder like the tutorial says.
View 8 Replies
View Related
Oct 11, 2010
Has anyone been successful in getting the Fennec nightly builds to run on the Hero? I'm getting to the home screen, but it then crashes before I can do anything. Here's the link (select the ARMv6 Experimental build):https://wiki.mozilla.org/Mobile/Platforms/Android#ARMv6_.28experimental.29
View 4 Replies
View Related
Sep 29, 2010
Is there anyway to port over the unlock screen from 2.0.1 onto new Froyo builds?
I really do miss the look and feel of the 2.0.1 lock screen.
View 3 Replies
View Related
May 31, 2010
I SHOULD be receiving my Incredible from VZW sometime soon and I have a quick question regarding apps. Can you rename some apps such as the Handcent SMS app or Gmail app? Is there an option to change it so it can just say "SMS" for the Handcent and "Email" for the Gmail app?
View 1 Replies
View Related
Jan 3, 2010
Is there a way to rename folders? I have 2 folders with various things in them but I always choose the wrong folder! I haven't found a way to rename the folder to something else.
View 4 Replies
View Related
Jun 29, 2010
Under the add to home screen you can add folders to your home screen, is there anyway of renaming the folder? I cant figure out how and all I have is a folder of games with the folder name "folder"
View 11 Replies
View Related
May 4, 2010
Did a search first. Is there any way to name an email attachment? Whenever my wife emails me a picture of our dogs (no kids so these are our kids) it always comes through as "photo" so when I download it saves as that. Now if I don't go back into the picture viewer and rename it the next time i try to save a photo attachment it tries to overwrite the last one as its comes in as "photo". Is there any easier way of renaming these attachment without having to go into picture viewer and renaming the last one first? Basically I'm want to do a "save as"
View 2 Replies
View Related
Nov 9, 2009
Has anyone come accross a app that works to orginize your photos as in renaming, being able to view by name and moving from one folder to another. I have found plenty of apps that modify photos but I need a program like Splash Photo to orginize over 2700 pictures.
View 2 Replies
View Related
Oct 11, 2010
Finally rooted my 2.2 leaked X. After going through the phone and renaming apps I wanted removed, certain ones are still there. Block Buster, News/weather and Social networking. I've cleaned the cache with cache cleaner and even done a battery pull. No go. I've even tried renaming them back to stock(apk)then back to bak.
View 2 Replies
View Related
Nov 6, 2009
Is there anyway to rename a shortcut on any of the Scenes? i.e., I have the built in "Voice Dialer" on my main home screen and its listed as "Voice Dial..." which for some reason is bugging the crap out of me.
View 2 Replies
View Related
Nov 8, 2009
When adding a new folder, it simply states: "Folder" Is it possible to give a folder a name? Modify the name of a folder? Re-name the folder? Once items are dragged into folders, can they be taken out? Dragged out? Deleted while in the folder? Seems I have to delete the entire folder and start over.
View 2 Replies
View Related
Dec 19, 2009
How can i delete scenes / save a current one without renaming it?
View 7 Replies
View Related
Nov 8, 2009
How to rename programs in HTC Hero? For example I downloaded new application, installed it, and want to rename...
View 2 Replies
View Related
Jun 23, 2010
1. Is it possible to rename photos on the X10?I suppose it would be possible to attach the phone to the computer and rename them on there, but is there any way of doing it from the phoine itself?
2.Is it possible to assign a contact name to a photo that has been downloaded to the phone?For example, if I happened to download a few pictures of Zhang Ziyi, can I create her as a contact and get the phone to recognise the pictures as being of her?I don;t see a way of doing it.The photos are clear shots that include her face.Again, perhaps I have to do it through the computer?
View 2 Replies
View Related