大部分来自于

http://developer.android.com/sdk/installing/studio-build.html


gradle build 会生成默认的debug版本 和 release 版本

gradle assemblerelease 不生成debug版本,只生成release版本

gradle assembledebug 不生成release版本,只生成debug版本

可以在下面的命令显示出得结果中看到版本的意思。


查看所有的task ,命令 :

gradletasks


osdeMacBook-Pro:app os$ gradle tasks

:app:tasks


------------------------------------------------------------

All tasks runnable from project :app

------------------------------------------------------------


Android tasks

-------------

androidDependencies - Displays the Android dependencies of the project

signingReport - Displays the signing info for each variant


Build tasks

-----------

assemble - Assembles all variants of all applications and secondary packages.

assembleDebug - Assembles all Debug builds

assembleHiapk - Assembles all Hiapk builds

assembleHiapkDebug - Assembles the Debug build for flavor Hiapk

assembleHiapkDebugTest - Assembles the Test build for the HiapkDebug build

assembleHiapkRelease - Assembles the Release build for flavor Hiapk

assemblePlaystore - Assembles all Playstore builds

assemblePlaystoreDebug - Assembles the Debug build for flavor Playstore

assemblePlaystoreDebugTest - Assembles the Test build for the PlaystoreDebug build

assemblePlaystoreRelease - Assembles the Release build for flavor Playstore

assembleRelease - Assembles all Release builds

assembleTest - Assembles all the Test applications

build - Assembles and tests this project.

buildDependents - Assembles and tests this project and all projects that depend on it.

buildNeeded - Assembles and tests this project and all projects it depends on.

clean - Deletes the build directory.


Help tasks

----------

components - Displays the components produced by project ':app'.

dependencies - Displays all dependencies declared in project ':app'.

dependencyInsight - Displays the insight into a specific dependency in project ':app'.

help - Displays a help message

projects - Displays the sub-projects of project ':app'.

properties - Displays the properties of project ':app'.

tasks - Displays the tasks runnable from project ':app'.


Install tasks

-------------

installHiapkDebug - Installs the Debug build for flavor Hiapk

installHiapkDebugTest - Installs the Test build for the HiapkDebug build

installHiapkRelease - Installs the Release build for flavor Hiapk

installPlaystoreDebug - Installs the Debug build for flavor Playstore

installPlaystoreDebugTest - Installs the Test build for the PlaystoreDebug build

installPlaystoreRelease - Installs the Release build for flavor Playstore

uninstallAll - Uninstall all applications.

uninstallHiapkDebug - Uninstalls the Debug build for flavor Hiapk

uninstallHiapkDebugTest - Uninstalls the Test build for the HiapkDebug build

uninstallHiapkRelease - Uninstalls the Release build for flavor Hiapk

uninstallPlaystoreDebug - Uninstalls the Debug build for flavor Playstore

uninstallPlaystoreDebugTest - Uninstalls the Test build for the PlaystoreDebug build

uninstallPlaystoreRelease - Uninstalls the Release build for flavor Playstore


Verification tasks

------------------

check - Runs all checks.

connectedAndroidTest - Installs and runs instrumentation tests for all flavors on connected devices.

connectedAndroidTestHiapkDebug - Installs and runs the tests for Build 'hiapkDebug' on connected devices.

connectedAndroidTestPlaystoreDebug - Installs and runs the tests for Build 'playstoreDebug' on connected devices.

connectedCheck - Runs all device checks on currently connected devices.

deviceAndroidTest - Installs and runs instrumentation tests using all Device Providers.

deviceCheck - Runs all device checks using Device Providers and Test Servers.

lint - Runs lint on all variants.

lintHiapkDebug - Runs lint on the HiapkDebug build

lintHiapkRelease - Runs lint on the HiapkRelease build

lintPlaystoreDebug - Runs lint on the PlaystoreDebug build

lintPlaystoreRelease - Runs lint on the PlaystoreRelease build


Other tasks

-----------

compileHiapkDebugSources

compileHiapkDebugTestSources

compileHiapkReleaseSources

compilePlaystoreDebugSources

compilePlaystoreDebugTestSources

compilePlaystoreReleaseSources


Rules

-----

Pattern: clean<TaskName>: Cleans the output files of a task.

Pattern: build<ConfigurationName>: Assembles the artifacts of a configuration.

Pattern: upload<ConfigurationName>: Assembles and uploads the artifacts belonging to a configuration.


To see all tasks and more detail, run with --all.


BUILD SUCCESSFUL


Total time: 8.967 secs




然后,在build tasks 中选取需要单独bulid的命令



有中文翻译版本在这,gradle编译

更多相关文章

  1. 编译Android常用命令
  2. Android管理联系人(包含添加,查询,修改和删除;以及不同版本区别)
  3. Cocos2d-x的Android配置以及相关参考文档
  4. 解析 Android(安卓)开发时的 SDK 版本参数设定
  5. 解决cocos2d-X 2.0版本后创建的Android项目提示org.cocos2dx.lib
  6. Error:(27, 13) Failed to resolve: com.android.support.constr
  7. MAC android Studio 5.0 环境搭建
  8. android wifi调试总结 theros AR6K命令小结 android wifi debug
  9. 深入分析Android(安卓)Binder 驱动

随机推荐

  1. 【gravity】android:layout_gravity 和 a
  2. Android Java 网络 OS等笔试题 -- 全
  3. Android之adb
  4. 谷安: Andorid 的故事:完整的 Android 历
  5. Android全球开发者大会参后感
  6. Google放弃“不做恶”? 意欲垄断Android
  7. Android零基础入门第33节:Android事件处理
  8. Android与H5互调详细介绍
  9. Windows下获取Android系统源码
  10. Android 扫码盒子全局接收付款码