Ant构建Android项目有依赖的lib [英] Ant build Android project with dependency lib

查看:247
本文介绍了Ant构建Android项目有依赖的lib的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个Android的项目,一个共享库和应用程序。现在,我要编译的应用程序与依赖关系到库中。在Eclipse中,它工作得很好。在那之后,我通过混帐上传到我的仓库并引发詹金斯建设两个项目。

I have two Android projects, one shared library and the app. Now I want to compile the app with dependency to the library. In Eclipse, it works very well. After that, I upload it via git to my repository and trigger Jenkins to build both projects.

我的问题是,出现的错误:SDK / Android的SDK-Linux的/工具/ ANT / build.xml文件:440:../shared-lib的决心:对项目没有project.properties文件的路径 。这是明显的,因为在詹金斯的作业存储比Eclipse的不同。

My problem is, that the error occurs: "sdk/android-sdk-linux/tools/ant/build.xml:440: ../shared-lib resolve to a path with no project.properties file for project". That's clear, because in Jenkins the jobs are stored different than under Eclipse.

另一个问题是,了Eclipse编译共享的.jar和Ant编译到classes.jar(在SDK / Android的SDK-Linux的/工具/ ANT / build.xml文件命名)。

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

推荐答案

我和拷贝文件固定它。第一个项目建立我的共享lib.jar 。其他项目(手机和平板电脑)复制此文件(共享lib.jar)那里 -folder和建立正确。但现在我有不同的 projects.properties 服务器和我的开发客户机上。这个人是不是签入到饭桶。

I fixed it with copy files. The first project builds my shared-lib.jar. The other projects (phone and tablet) copy this file (shared-lib.jar) to there libs-folder and build correctly. But now I have different projects.propertieson the server and my dev-client. This one is not checked in into git.

这篇关于Ant构建Android项目有依赖的lib的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆