构建和使用Ant调试运行,从而为在命令行中的一个子项目Android项目 [英] build and run android project having a subproject in command line using ant debug
问题描述
我想BUIL命令行的Android项目。我的Android项目有我的主要的Android项目内的子项目。当我运行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屋!