我有一个多项目(~10个模块),每次建筑大约需要20-30秒.当我在Android Studio中按Run时,我必须每次都等待重建应用程序,这非常慢.
是否可以在Android Studio中自动化构建过程?或者您对如何更快地完成此过程有任何建议?
在Eclipse中,由于自动构建,在模拟器上运行相同的项目大约需要3-5秒.
这是我的build.gradle文件(app模块):
buildscript {
repositories {
maven { url 'http://repo1.maven.org/maven2' }
}
dependencies {
classpath 'com.android.tools.build:gradle:0.4'
}
}
apply plugin: 'android'
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
compile project(':libraries:SharedLibs')
compile project(':libraries:actionbarsherlock')
compile project(':libraries:FacebookSDK')
compile project(':libraries:GooglePlayServices')
compile project(':libraries:HorizontalGridView')
compile project(':libraries:ImageViewTouch')
compile project(':libraries:SlidingMenu')
}
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 8
targetSdkVersion 16
}
}
Run Code Online (Sandbox Code Playgroud) 说我有一个文件/templates/apple,我想
所以,/templates/apple将被复制到/templates/usedAND /templates/inuse
然后之后我想删除原始.
是cp最好的方法,然后rm呢?或者,还有更好的方法?
我想在一行中完成所有操作,所以我认为它看起来像:
cp /templates/apple /templates/used | cp /templates/apple /templates/inuse | rm /templates/apple
Run Code Online (Sandbox Code Playgroud)
这是正确的语法吗?
如何从命令行启动Android应用程序?
有类似的问题,但我找不到任何答案.