1.下载插件
终端下,进入工程目录cd /Users/zhouxiyuan/git/fording
执行
./gradle
./gradlew clean
下载插件
2.配置环境变量
修改 .bash_profile 文件
export PATH=${PATH}:/Users/zhouxiyuan/Downloads/AndroidSDK/platform-tools/
export ANDROID_SDK=/Users/zhouxiyuan/Downloads/AndroidSDK
export ANDROID_HOME=/Users/zhouxiyuan/Downloads/AndroidSDK
3.命令执行
重新进入终端
cd ~/fording/ ---重新进入目录
./gradlew tasks ---
------------------------------------------------------------
All tasks runnable from root project-----所有任务运行的根项目
------------------------------------------------------------
Android tasks ---Android任务
-------------
androidDependencies - Displays the Android dependencies of the project ---显示项目的Android的依赖
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---集合所有的调试版本
assembleDebugTest - Assembles the Test build for the Debug build ---组装测试生成调试版本
assembleRelease - Assembles all Release builds---集合所有发布版本
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. ---删除生成目录
Build Setup tasks ---建立任务
-----------------
init - Initializes a new Gradle build. [incubating]---初始化一个新的工具-建立。[培养]
wrapper - Generates Gradle wrapper files. [incubating]---包装文件生成工具。[培养]
Help tasks ---帮助任务
----------
dependencies - Displays all dependencies declared in root project 'fording’.
---表现在根项目涉水宣布所有的依赖”。
dependencyInsight - Displays the insight into a specific dependency in root project 'fording’.
---显示洞察根项目涉水特定的依赖
help - Displays a help message
projects - Displays the sub-projects of root project 'fording’. ---显示根项目“涉水”子项目
properties - Displays the properties of root project 'fording’. ---属性-显示根项目“涉水”的属性。
tasks - Displays the tasks runnable from root project 'fording' (some of the displayed tasks may belong to subprojects).
---任务-显示任务运行的根项目涉水”(有些显示的任务可能属于子项目)
Install tasks
-------------
installDebug - Installs the Debug build ---installdebug安装调试版本
installDebugTest - Installs the Test build for the Debug build---installdebugtest安装测试生成调试版本
installRelease - Installs the Release build---installrelease安装发布版本
uninstallAll - Uninstall all applications.---卸载所有的应用程序。
uninstallDebug - Uninstalls the Debug build---卸载调试版本
uninstallDebugTest - Uninstalls the Test build for the Debug build---卸载调试版本
uninstallRelease - Uninstalls the Release build--卸载发布版本
Verification tasks---验证工作
------------------
check - Runs all checks. ---运行检查
connectedAndroidTest - Installs and runs the tests for Build 'debug' on connected devices.
---安装和运行建立“调试”上连接的设备的试验。
connectedCheck - Runs all device checks on currently connected devices.
---运行所有设备检查当前连接的设备。
deviceCheck - Runs all device checks using Device Providers and Test Servers.
---运行所有设备检查使用设备供应商和测试服务器。
lint - Runs lint on all variants.
lintDebug - Runs lint on the Debug build
lintRelease - Runs lint on the Release build
Other tasks
-----------
assembleDefault
To see all tasks and more detail, run with —all.
4.打包
./gradlew assembleRelease ---发布版本
打包文件 Disk ▸ 用户 ▸ zhouxiyuan ▸ fording ▸ main ▸ build ▸ apk