构建和使用Ant调试运行,从而为在命令行中的一个子项目Android项目 [英] build and run android project having a subproject in command line using ant debug

查看:153
本文介绍了构建和使用Ant调试运行,从而为在命令行中的一个子项目Android项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想BUIL命令行的Andr​​oid项目。我的Andr​​oid项目有我的主要的Andr​​oid项目内的子项目。当我运行ant debug命令它显示了建筑类错误,因为没有发现从子项目库类。因此,我认为分项目不包括在内正确,我们需要执行一些命令的。

I am trying to buil an android project from command line. My android project has a sub project inside my main android project. When I run the ant debug command it showing error in building classes as not found the library classes from the subproject. So I think the sub project is not included correctly, we need to execute some command for that.

请帮忙,在此先感谢

推荐答案

我是从Android的官方文档答案:

I got the answer from Android official doc:

android update lib-project --target 3 --path ZBarScanner-master/ZBarScannerLibrary 
android update project --name android_app --path . --library ZBarScanner-master/ZBarScannerLibrary 

首先,我们需要更新库项目,然后更新主体工程。双方应做更新之前创建。然后做:

First we need to update the library project and then update the main project. Both should be created before doing the update. Then do:

ant clean 
ant debug

这篇关于构建和使用Ant调试运行,从而为在命令行中的一个子项目Android项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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