2
votes

I have 2 projects ( source code) . The project A is the library uncompiled and the project B uses that library. I want to compile that using ant. I'm using android update to setup like that.

android update lib-project --target 2 --path c:\Android-Build\A

android update project --target 2 --path c:\Android-Build\B --library ..\A

In the libs folder of the project B i don't have anything. All the libraries i'm using are on the library (A). Using eclipse everything comes out normally.

How can i do that compiling using ant.

ant debug throw errors . The library (A) compiles first ( bin and gen folders are generated).

But when comes to the project B to get compiled cannot find the imports from the library. How can i tell ant to include the library to the project B during its build proccess? ty.

[javac] C:\Android-Build\B Activity.java:7: error: cannot find symbol [javac] import com.a.A;

*UPDATE**


project.properties for project B.

android.library.reference.1=..\\A
# Project target.
target=Google Inc.:Google APIs:13

project.properties for project A.

target=Google Inc.:Google APIs:13

the \\ seems to be correct because if i change it to \ ant cannot find the library

1
Please add project.properties for B project. - inazaruk
Hm, nothing wrong here. Please also add project.properties for A project. - inazaruk
Also added. I don't think it has anything to do with the property files. When i build the project B library A gets compiled but B don't include that library. - weakwire

1 Answers

5
votes

Add next line to your A's project.properties file:

android.library=true