Ant create an Android project using lib

I have two Android projects, one shared library and an application. Now I want to compile the library dependent application. In Eclipse, it works very well. After that, I upload it via git to my repository and run Jenkins to create both projects.

My problem is that an error occurs: "sdk / android-sdk-linux / tools / ant / build.xml: 440: ../ shared-lib resolves the path without the project.properties file for the project." This is clear because jobs are stored differently in Jenkins than in Eclipse.

Another problem is that Eclipse compiled shared access to ".jar" and Ant compiled it to "classes.jar" (named in sdk / android-sdk-linux / tools / ant / build.xml).

+5
source share
2 answers

I fixed it using copy files. The first project is building mine shared-lib.jar. Other projects (phone and tablet) copy this file (shared-lib.jar) there libs-memory and build correctly. But now I have different projects.propertieson the server and my dev client. This is not tested on git.

+1
source

Ant scripts should allow you to include any files you need. In your case, I suggest that you move the link to the file shared-libto local.properties(this file should also be read by the ant script generated by the update project. Save the appropriate path for jenkins in the repository and change the file locally for the local built-in. In the file in the repository you will need something- something like:

android.library.reference.1=../classes.jar 

. , , , .

+4

All Articles