[笔记] Android开发中的gradle是什么?
- gradle是什么?
先看下文档中的介绍 https://docs.gradle.org/current/userguide/what_is_gradle.html
Gradle is an open-source build automation tool that is designed to be flexible enough to build almost any type of software.
gradle是开源的自动编译工具,可以方便自由的编译任何软件。
然后进行了一些笼统的介绍,其中提到了一些需要注意的地方,贴出来如下,感觉这个提醒短期内也用不到。
The most notable restriction is that dependency management currently only supports Maven- and Ivy-compatible repositories and the filesystem.
最需要注意的一点是依赖包管理目前只支持Maven- and Ivy-compatible repositories and the filesystem。
- 用gradle编译一个Android实例
参考https://docs.gradle.org/current/samples/sample_building_android_apps.html
贴出来如下:
Building Android Apps Sample
This sample shows how a simple Android application written in Java can be built with Gradle. The application was created following the Build your first app guide.
plugins {
id('com.android.application') version '7.1.1'
}
repositories {
google()
mavenCentral()
}
android {
compileSdkVersion 30
defaultConfig {
applicationId 'org.gradle.samples'
minSdkVersion 16
targetSdkVersion 30
versionCode 1
versionName '1.0'
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
testImplementation 'junit:junit:4.13.1'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}
To build the application:
$ ./gradlew build
For more information, we suggest reading Getting Started with Gradle. You can also find Android development related information inside the guides provided by the Android team.
[笔记] Android开发中的gradle是什么?的更多相关文章
- Android开发:《Gradle Recipes for Android》阅读笔记1.2
在android开发中会需要配置使用app的android SDK的最低版本和目标版本,这个是bulidl.gradle的android模块设置.默认有以下几个设置: applicationId,这个 ...
- Android 开发中,as或者idea对gradle的使用
原文:Android 开发中,as或者idea对gradle的使用 本文属于转载收藏,侵删,出处:私人博客 ---------------------------------------------- ...
- 设计模式笔记之二:Android开发中的MVP架构(转)
写在前面,本博客来源于公众号文章:http://mp.weixin.qq.com/s?__biz=MzA3MDMyMjkzNg==&mid=402435540&idx=1&sn ...
- 在Android 开发中使用 SQLite 数据库笔记
SQLite 介绍 SQLite 一个非常流行的嵌入式数据库,它支持 SQL 语言,并且只利用很少的内存就有很好的性能.此外它还是开源的,任何人都可以使用它.许多开源项目((Mozilla, PH ...
- Android学习探索之Java 8 在Android 开发中的应用
前言: Java 8推出已经将近2年多了,引入很多革命性变化,加入了函数式编程的特征,使基于行为的编程成为可能,同时减化了各种设计模式的实现方式,是Java有史以来最重要的更新.但是Android上, ...
- 在android开发中使用multdex的方法-IT蓝豹为你整理
Android系统在安装应用时,往往需要优化Dex,而由于处理工具DexOpt对id数目的限制,导致其处理的数目不能超过65536个,因此在Android开发中,需要使用到MultiDex来解决这个问 ...
- Android开发中,那些让您觉得相见恨晚的方法、类或接口
Android开发中,那些让你觉得相见恨晚的方法.类或接口本篇文章内容提取自知乎Android开发中,有哪些让你觉得相见恨晚的方法.类或接口?,其实有一部是JAVA的,但是在android开发中也算常 ...
- Dagger2在Android开发中的应用
世界是普遍联系的,任何事物和个体都直接或间接相互依赖,在时空长河中共同发展.在面向对象的世界中,更是如此,类与类之间的依赖,关联关系,模块(亦或是分层架构中的层)之间的耦合关系,都是我们在软件开发实践 ...
- JNI 开发基础篇:Android开发中os文件的探索
正题: android开发中,时长会遇到os文件的使用,那么os文件到底是什么?在这篇文章中会进行说明. .os文件在android中意味着C语言书写的方法,经android提供的ndk进行编译,从而 ...
- Android开发中常见的设计模式 MD
Markdown版本笔记 我的GitHub首页 我的博客 我的微信 我的邮箱 MyAndroidBlogs baiqiantao baiqiantao bqt20094 baiqiantao@sina ...
随机推荐
- SVN服务器的安装与使用
一.下载服务端和客户端安装包 百度网盘: 链接:https://pan.baidu.com/s/1QkNbLR9ZkcYPiBp6d_drlQ 提取码:tmi5 也可以在官网自行下载. 二.服务端安装 ...
- URL带参数json传递进行解析
注意参数格式是要加密的: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> ...
- select省市联动+对应经销商、自定义箭头
HTML: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <met ...
- Postgresql之闪回数据库示例
一.摘要 在Oracle中,若发生重大的误操作,那么我们可以使用flashback database命令来把数据库整体闪回到过去的误操作的时间点,当然前提是需要打开数据库的闪回功能. 在PG中,能否也 ...
- 一步步入门Jenkins+Net Core3.1+Gitlab,实现 CICD
架构说明: 由浅入深,我们暂时不考虑分布式,安装Jenkins到用户服务器进行CICD 需要两台服务器 Gitlab:192.168.232.128:12080 源代码仓库,可以参考<安装git ...
- python链接数据库
一.链接数据库 #sql1.py import pymysql # user=input('用户名: ').strip() # pwd=input('密码: ').strip() #链接 # conn ...
- C# Post调用接口并传递json参数
1 public string Post(string Url, string jsonParas) 2 { 3 string strURL = Url; 4 //创建一个HTTP请求 5 HttpW ...
- python发送钉钉消息通用脚本
1.使用shell生成需要发送的内容. 2.调用该脚本发送文本内容python3,其中的文件 /wj/sbjk,需要改成直接需要发送的文件. [root@manager dingding]# more ...
- 多点DLT (Direct Linear Transformation) 算法
阅读前可以先参看上一篇代数视觉博客: 四点DLT (Dierct Linear Transformation) 算法 对于大于4个点的数据点来进行 DLT 算法变换, 如果数据点的标注都十分准确,那么 ...
- 使用源码编译安装PHP7
使用源码编译安装PHP7 2015年6月11日,PHP官网发布消息,正式公开发布PHP7第一版的alpha版本. PHP7特性: PHP 7.0.0 Alpha 1使用新版的ZendEngine引擎, ...