Emma using Android: errors related to external framework (simple xml framework)

209 views Asked by At

I am trying to get Emma running with my Android projec, so I followed the steps given: http://dtmilano.blogspot.ca/2011/08/linuxcon-2011-north-america.html and https://wiki.jenkins-ci.org/display/JENKINS/Building+an+Android+app+and+test+project -> set up ant.

I am running the command ant clean emma debug install test in my test project directory and am getting the following errors:

-compile:
    [javac] Compiling 112 source files to C:\Users\RL\workspace\FS\bin\classes
    [javac] C:\Users\RL\workspace\FS\src\FS\models\elements\Elements.java:7: package org.simpleframework.xml does not exist
    [javac] import org.simpleframework.xml.ElementList;
    [javac]                               ^
    [javac] C:\Users\RL\workspace\FS\src\FS\models\elements\Elements.java:8: package org.simpleframework.xml does not exist
    [javac] import org.simpleframework.xml.Root;
    [javac]                               ^
    [javac] C:\Users\RL\workspace\FS\src\FS\models\elements\Elements.java:15: package com.thoughtworks.xstream.annotations d
oes not exist
/... +97 similar errors .../

The original project under test uses Simple framework and Emma seesms to have trouble with them. Therefore, I added these jars to the java build path of the testproject, but it did not make any difference.

I converted my project to ant using the commands:

android update project --path C:\Users\RL\workspace\FS --name FS --target android-11
android update test-project --main ../FS --path C:\Users\RL\workspace\FSTest

and the generated build.xml looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<project name="FSTest" default="help">
    <property file="local.properties" />
    <property file="ant.properties" />
    <property environment="env" />
    <condition property="sdk.dir" value="${env.ANDROID_HOME}">
        <isset property="env.ANDROID_HOME" />
    </condition>
    <loadproperties srcFile="project.properties" />
    <fail message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through the ANDROID_HOME environment variable."
          unless="sdk.dir" />
    <import file="custom_rules.xml" optional="true" />
    <import file="${sdk.dir}/tools/ant/build.xml" />
</project>

If needed, I can attach a full java error trace as well (it contains 100 errors, all similar to those above.

How can I inject the dependencies to the external framework?

1

There are 1 answers

0
Rebane Lumes On BEST ANSWER

I managed to solve the problem by transferring all external jar libraries to /libs library and thereafter I can build the tests.