Android :: Android Library Projects Custom Builds

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?

Android :: Android library projects custom builds


Android : Custom Attributes In Library Projects?

Jul 8, 2010

Having custom attribute (in attrs.xml) in library project leads to compilation fail of the project dependent of that library.Code...

How to avoid this except for no having custom attributes in library?

View 7 Replies View Related

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 View Related

Android :: Store Values In SharedPreferences In Library Code / Have It To Projects That Include Library?

Nov 11, 2010

I have an Android library project that makes calls to PreferencesManager.getDefaultSharedPreferences.

I have 2 version of my app, paid/free, and they are not able to access the preferences stored by the library code.

Can someone tell me the right way to store values in SharedPreferences in library code and have the values available to projects that include the library?

View 2 Replies View Related

Android :: Building Phone Library Projects From Command Line

Jul 29, 2010

I'm updating my application to take advantage of Android library projects. While I can get everything to build fine within Eclipse, I'm stuck trying to update my build.sh script to support library projects. At the moment, I can't figure out what options to pass to appt to tell it to look at my library projects when building my main project. Checking aapt--help has not been illuminating so far. Any suggestions?

View 3 Replies View Related

Android :: Android Library Projects And Having To Manually Refresh

Jun 28, 2010

If I make changes in my Android Library project I have to manually refresh, and sometimes clean all projects that use the Library. Is this normal? Is there a way around this?

View 3 Replies View Related

Android :: Does AndParcel Allow Android Library Projects?

Jul 10, 2010

Does AndParcel allow Android Library project functionality? Meaning, I should be able to include an Android Library project as a parcel correct or no?

View 1 Replies View Related

Samsung Behold 2 :: Custom Boot Animation / Google Builds

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

Android :: Android Library Projects

Sep 7, 2010

I created a libray android pakage i included a external jar (apache.commons) i marked the project as library. I create a new android project add library under andriod tab add project under source tab build it and it builds fine. As soon as i call something out of that class i get a java.lang.NoClassDefFoundError. What is going on. I tried adding uses-library but then i get shared library not found. My permissions is the same as the library project. There is no activities in library project.

View 1 Replies View Related

Android : Use Custom Library Apk File In Other Apps

Sep 7, 2009

I have my own custom library apk file (say lib.apk) & i want make it available to other applications.

How to provide the uses-library in the android manifest.xml file in other apps so as to use my custom library.

View 4 Replies View Related

Android : Create A Custom Library To Use Across Several Appilcations?

Dec 1, 2009

Is it possible to create a custom library in android (having its own layout resources) for use across several android applications?

I created a regular *.jar file but when I tried to create/style my views dynamically most of the properties do not work. Even referencing simple styles from the android.jar file such as android.attr.listSeparatorTextViewStyle did not work.

I created an android project without any Activity, having its own resource files and then referenced this project from another Android project to use in its build path. Everything seems to work fine but the emulator keeps crashing (with no meaningful error message in the LogCat) when I try to run the project.

View 2 Replies View Related

Android :: Set Android Application Dependency From Custom Java Library

Apr 2, 2010

I using Eclipse Gallileo to develop Android application and Java library for this application. Please, help to set Android application dependency from my custom Java library rightly. I want this library automatically build if necessary and be included to .apk file.

View 6 Replies View Related

Android :: Self-contained Test Library Project Cannot Find Library Classes

Aug 17, 2010

According to this SDK guide, unit-testing a Library project can be achieved by creating a standard application project, reference the Library project and then instrument the application for unit testing. However, when I do this and launch the test application I get the message.No tests found with test runner 'JUnit 3".I'm using Eclipse and the Android ADT plugin, all latest versions.the projects compile just fine. The test project also installs fine to the emulator. But in the console I can see that it looks for <library>.apk, which of course doesn't exist since I'm compiling this as a library into the test project.

View 1 Replies View Related

Android :: App Builds Up Large Cache

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

Android :: Fennec Nightly Builds

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

Android :: Load Native Library Which Depends On Third Shared Library

Aug 26, 2009

I created a jni library which depends the third shared library, I must copy the third shared library to /system/lib, otherwise, Java application can't load jni library. But you know, on G1 with official OS image, /system/lib is readonly. I tried to call System.setProperty to set java.library.path to the location stored the thired shared library before load jni library, but the issue still exists.

View 6 Replies View Related

Android :: Ant And Eclipse Builds Don't Play Nice

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

Android :: Creating Different Builds For Same Source Code

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

General :: Install Custom Roms With Odin3 And Get Microsoft Visual C++ Runtime Library Error?

May 3, 2013

Sometimes when I try to install custom roms with odin3 I get a Microsoft Visual C++ Runtime Library error. It always says: "This application has requested the Runtime to terminate in an unusual way. Please contact the application's support team for more information". Right now, I am trying to flash a custom rom and it is giving me this. Do I need to change something in the data.img or something?

View 3 Replies View Related

Android :: How To Disable Asset Compression In Eclipse Builds?

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

Android :: Differences Between Jar Library And Library Project

Jul 15, 2010

As I understand, the three ways of distributing my application are via Jar, Android Library and Android Library Project.Jar - cannot contain resources or XML layouts (so this is out for me)Android Library - I don't really know how this works but the Google API uses it..Android Library Project - includes resources but allows the client free rein on the code as it is distributed as source.If I am to create a closed source application that requires drawables and XML files that I want to distribute to other Android programmers, what should I use? And can someone direct me to a tutorial on creating an Android Library?

View 4 Replies View Related

Motorola Droid :: 2.2 Builds Facebook Sync

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

HTC Eris :: Cricket Internet Doesn't Work On Froyo Builds?

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

Sprint HTC Hero :: Firefox Mobile (Fennec) Nightly Builds

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

Motorola Droid :: Port Over Unlock Screen From 2.0.1 Onto New Froyo Builds?

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

Android :: Build 2 Projects In On Apk

Mar 30, 2010

I seperate my application into 2 projects. one for UI,the other is for service.How can I build these 2 applications into one apk?

View 9 Replies View Related

Android :: Can't Use Dependent Projects In 1.5 / Fix This?

May 5, 2009

I have 2 projects in the following layout

MainActivityProject -> BaseProject

(i.e. MainActivityProject depends on the other project). Both are android projects created with the eclipse "New Android project functionality) however, the BaseProject does not have an activity defined. However, in BaseProject I define an activity base class where MainActivityProject's Activity derives from. This used to work fine up until 1.1 but now with the 1.5 SDK I get ClassNotFoundExceptions when launching the app.

Any suggestion on how to fix this? I obviously dont want to copy all the sources to a single project as I intend to reuse my Activity base class for other things (it contains some boiler plate stuff that I dont want to have in each and every activity.

View 3 Replies View Related

Android :: Projects In Two Different Locations And Importing In Eclipse?

Mar 10, 2010

I always face this problem in my eclipse. I would like have a copy of the apps in all the versions of SDKs/NDKs. And once I have a project in eclipse, and if I have to import the same project from a new location, I get the message saying "Can't import, project of the same name already exists". Is this how it is? We cant import the same project from its 2nd location in eclipse? Everytime I delete the project from old location and put it in new. I know, it is a very unacceptable approach).

View 2 Replies View Related

Android :: How To Build APK From Multiple Eclipse Projects?

Nov 11, 2009

Does anyone know of suggestions/recommendations on how to structure Eclipse projects in order to build an apk from multiple projects? I would like to share classes & resources (strings, layouts, etc.) across multiple apps. How to structure Eclipse projects to do such a thing!

View 8 Replies View Related

Android :: AIDL In Multiple Projects In Eclipse

Mar 16, 2010

I have problems with the following: I want to create to applications. One with a Android service and one with a Activity that will use functions on the Service. Before I splitted this in to applications I got everything working in one application. I can call functions (that are definned in the aidl - file) on the service without problems.

Now the problems coms. I splitted the application into two parts, a Service application and Gui application. The bindins to the service (in the gui application) works and I see that the service is getting created. Then in the onServiceConnected function of the ServiceConnection class I created the following:

mService = IMyService.Stub.asInterface(service);
And this gives me the following exception:
03-16 13:53:05.549: ERROR/AndroidRuntime(881): java.lang.NoClassDefFoundError: MyPackage.IMyService$Stub

It looks like he can't find the Stub class in IMyService. But the Stub is part of the java file generated out of the aidl-file. Why I get this exception or how I can resolve this?

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved