Notes - wk11 Gradle, NDK, and other
2016-05-13 11:42
190 查看
previously: <-use of LBS
Gradle
Gradle 是一个基于Apache Ant和Apache Maven概念的项目自动化构建工具。当前支持语言限于Java, Groovy, Scala.
Coding:
-编译源代码
-运行单元测试和集成测试
-执行静态代码分析
-创建发布版本
-部署目标环境
-部署传递过程
-执行冒烟测试和自动化测试
shell-command line - gradle setting
gradle-gradle-wrapper.properties下面有一个gradle下载链接地址,在我们运行程序的时候如果确实gradle或者gradle对应链接下载不了,可能会卡死
可以在settings-preference里-gardle设置use local gradle distribution, 引用gradle官网链接地址
setting.gradle: 包含的模块, shift+F6 refract
file - new module libraryName
build.gradle: //top level build file where you can add configuration options common to all sub-projects/modules;
jcenter
task clean(type: Delete) {
delete rootProject.buildDir //can also write in Java here
}
Gradle command lines:
gradle: help, version, build, clean, tasks, tasks-all
build-outputs-apk
gradle stop: ctrl + c
rm -rf ~/.gradle
gradle clean && gradle build
gradle assembleDebug/aD
gradle运行支持缩写,测试,Lint,合并规则
aar自带manifest
settings-preferences-gradle-offline work
dex 65535
按字母顺序排列
Docs:
Gradle User:
https://docs.gradle.org/current/userguide/userguide.html
Google gradle plugin user guide
NDK (native development kit)/JNI (Java native interface Java原生接口)
使用NDK的优势:1. 保护代码:APK的JAVA层容易被反编译,C/C++库返回难度较大;2. 方便使用现存开源库; 3. 提高程序的执行效率;4. 便于移植
劣势:1. 开发麻烦;2. 调试不方便; 3. 难度相对较高
ATTN: 使用NDK大部分情况下是需要将一些已有的C函数库移植到Android平台的所选择的快捷方法,而不是作为提高代码效率的手段
How to
1. use AS to creae a native project
2. to build and trace native code
3. use experimental gradle plugin for native project
使用编译好的”.so”动态库//copy and quote
使用C/C++源代码开发
下载NDK,配置 (http://developer.android.com/intl/zh-cn/ndk/index.html)
也可以直接project structure 下面NDK直接download
References:
/article/8947684.html
Gradle
Gradle 是一个基于Apache Ant和Apache Maven概念的项目自动化构建工具。当前支持语言限于Java, Groovy, Scala.
Coding:
-编译源代码
-运行单元测试和集成测试
-执行静态代码分析
-创建发布版本
-部署目标环境
-部署传递过程
-执行冒烟测试和自动化测试
shell-command line - gradle setting
gradle-gradle-wrapper.properties下面有一个gradle下载链接地址,在我们运行程序的时候如果确实gradle或者gradle对应链接下载不了,可能会卡死
可以在settings-preference里-gardle设置use local gradle distribution, 引用gradle官网链接地址
setting.gradle: 包含的模块, shift+F6 refract
file - new module libraryName
build.gradle: //top level build file where you can add configuration options common to all sub-projects/modules;
jcenter
task clean(type: Delete) {
delete rootProject.buildDir //can also write in Java here
}
Gradle command lines:
gradle: help, version, build, clean, tasks, tasks-all
build-outputs-apk
gradle stop: ctrl + c
rm -rf ~/.gradle
gradle clean && gradle build
gradle assembleDebug/aD
gradle运行支持缩写,测试,Lint,合并规则
aar自带manifest
settings-preferences-gradle-offline work
dex 65535
按字母顺序排列
Docs:
Gradle User:
https://docs.gradle.org/current/userguide/userguide.html
Google gradle plugin user guide
NDK (native development kit)/JNI (Java native interface Java原生接口)
使用NDK的优势:1. 保护代码:APK的JAVA层容易被反编译,C/C++库返回难度较大;2. 方便使用现存开源库; 3. 提高程序的执行效率;4. 便于移植
劣势:1. 开发麻烦;2. 调试不方便; 3. 难度相对较高
ATTN: 使用NDK大部分情况下是需要将一些已有的C函数库移植到Android平台的所选择的快捷方法,而不是作为提高代码效率的手段
How to
1. use AS to creae a native project
2. to build and trace native code
3. use experimental gradle plugin for native project
使用编译好的”.so”动态库//copy and quote
使用C/C++源代码开发
下载NDK,配置 (http://developer.android.com/intl/zh-cn/ndk/index.html)
也可以直接project structure 下面NDK直接download
References:
/article/8947684.html
相关文章推荐
- 【第九章】 Spring的事务 之 9.3 编程式事务 ——跟我学spring3
- UITextField常用属性及键盘收回的几种方式
- 1.imread函数 首先,我们看imread函数,可以在OpenCV官方文档中查到其原型如下: Mat imread(const string& filename, int flags=1
- 表达式设计原理
- Tinkphp
- web前段 弹出小例子
- 最好用Html转pdf的工具——wkhtmltopdf
- IOS 使用AES/ECB/PKCS7Padding 加密、解密数据
- copy项目后修改项目的部署名称
- C++ 指针加减运算
- no device found for connection ‘ System eth0′
- JAVA 设置环境变量批处理
- Android Dev Intro - Android ADB Command Examples
- LeetCode No343. Integer Break
- Home 和Back键下Activity 生命周期
- 被人牵着鼻子走是兵家之大忌
- INNODB索引单列不能超767 复合不能超3072
- 随机生成字符串
- 观察者模式 Publish/Subscribe
- XAMPP升级PHP