Android studio使用

来源:互联网 发布:无人机航线保持算法 编辑:程序博客网 时间:2024/06/12 18:08

1.gradle版本更新下载
1)setting->Build,Execution…->Build Tools->Gradle查看路径Service directory path
2)手动下载后放在对应目录下的文件夹内例如/home/user/.gradle/wrapper/dists/gradle-2.10-all/a4w5fzrkeut1ox71xslb49gst
2.APK 6种依赖
查看方式Project Structure->modules->dependencies
Compile
compile是对所有的build type以及favlors都会参与编译并且打包到最终的apk文件中。
Provided
Provided是对所有的build type以及favlors只在编译时使用,类似eclipse中的external-libs,只参与编译,不打包到最终apk。
APK
只会打包到apk文件中,而不参与编译,所以不能再代码中直接调用jar中的类或方法,否则在编译时会报错
Test compile
Test compile 仅仅是针对单元测试代码的编译编译以及最终打包测试apk时有效,而对正常的debug或者release apk包不起作用。
Debug compile
Debug compile 仅仅针对debug模式的编译和最终的debug apk打包。
Release compile
Release compile 仅仅针对Release 模式的编译和最终的Release apk打包。

0 0
原创粉丝点击