我已经创建了一个批处理文件,用于为使用eclipse创建的一组android项目(一个MainProject和3个库项目)构建apk文件
它在eclipse中正确编译,但它没有通过批处理文件正确编译(bcos只在批处理文件中执行第一个语句)。
以下是批处理文件中的代码
cd C:\MainFoldere\
set ANT_HOME=C:\apache-ant-1.9.1\
set JAVA_HOME=c:\Progra~1\Java\jdk1.7.0_17\
set PATH=%PATH%;%ANT_HOME%\bin;%JAVA_HOME%\bin;C:\Documents and Settings\User\Desktop\adt-bundle-windows\adt-bundle-windows-x86-20130522\sdk\tools
android update project -p ./Library1 --subprojects --target 1
cd C:\MainFoldere\\Library1
ant clean
ant debug
cd ..
android update project -p ./Library2 --library ../Library1 --subprojects --target 1
cd C:\MainFoldere\\Library2
ant clean
ant debug
cd ..
android update project -p ./Library3 --library ../Library2 --subprojects --target 1
cd C:\MainFoldere\\Library3
ant clean
ant debug
cd ..
android update project -p ./MainProject --library ../Library3 --subprojects --target 1
cd C:\MainFoldere\\MainProject
ant clean
ant debug
cd C:\MainFoldere\
set ANT_HOME=C:\apache-ant-1.9.1\
set JAVA_HOME=c:\Progra~1\Java\jdk1.7.0_17\
set PATH=%PATH%;%ANT_HOME%\bin;%JAVA_HOME%\bin;C:\Documents and Settings\User\Desktop\adt-bundle-windows\adt-bundle-windows-x86-20130522\sdk\tools
android update project -p ./Library1 --subprojects --target 1
cd C:\MainFoldere\\Library1
ant clean
ant debug
cd ..
android update project -p ./Library2 --library ../Library1 --subprojects --target 1
cd C:\MainFoldere\\Library2
ant clean
ant debug
cd ..
android update project -p ./Library3 --library ../Library2 --subprojects --target 1
cd C:\MainFoldere\\Library3
ant clean
ant debug
cd ..
android update project -p ./MainProject --library ../Library3 --subprojects --target 1
cd C:\MainFoldere\\MainProject
ant clean
ant debug
答案 0 :(得分:3)
在每行之前添加CALL,它将执行所有命令