The latest SDK uses emma, placing emma before building:
ant emma debug install ant emma debug install test
The first is from your project director, and the second is from the test catalog. This will create a complete coverage report.
for more information see link
ADT r20-preview solves this problem by providing access to the full trajectory of classes of tested projects and their projects in the library:
http://tools.android.com/download/adt-20-preview
This will give you reports on code coverage in your library projects, but you will need to make some changes to the build.xml test target to attach the source files.
See this file for attaching an Android library to an Emma report (ant, emma) for more information on how to enable emma check coverage for your library projects at present.
Example-build.xml
<emma> <report sourcepath="${tested.project.absolute.dir}/${source.dir};${tested.android.library.source.dir}" verbosity="${verbosity}"> <infileset dir="."> <include name="coverage.ec" /> <include name="coverage.em" /> </infileset> <html outfile="coverage.html" /> </report> </emma>
ant.properties
This may be a list of directories separated by semicolons.
tested.android.library.source.dir=../library/src;etc
source share