Android 基础入门 基础简介

1. 观察App运行日志

2.Android 开发设计的编程语言

koltin Java c c++

3.工程目录结构

4.Gradle

5.build.gradle 文件解析

Kotlin 复制代码
plugins {
    id("com.android.application")//用了哪些插件 主配置文件版本控制 所以这里不用写版本
}

android {
    namespace = "com.tiger.myapplication"
    compileSdk = 34  //指定编译用的SDK版本号。比如34 表示使用的是 Android 15.0 编译

    defaultConfig {
        applicationId = "com.tiger.myapplication" //指定该模块的应用编号,也就是 App的 包名
        minSdk = 28 //指定App适合运行的最小 SDK 版本号。 比如19表示要在Android 4.4 以上运行
        targetSdk = 34 //指定目标设备的SDK版本号。表示 App 最希望在哪个 Android 上运行
        versionCode = 1 //指定App的应用版本号  和Maven version一样
        versionName = "1.0" // 指定App 的应用版本名称

        testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"//单元测试
    }

    buildTypes {
        release {//混淆文件
            isMinifyEnabled = false
            proguardFiles(
                getDefaultProguardFile("proguard-android-optimize.txt"),
                "proguard-rules.pro" //混淆规则的那个文件 Gradle Scripts 包下
            )
        }
    }
    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_1_8
        targetCompatibility = JavaVersion.VERSION_1_8
    }
}

dependencies {
    //依赖项
    implementation("androidx.appcompat:appcompat:1.6.1") //兼容的库 主启动类上面 继承 AppCompatActivity 就是在这个包下 ,为了达到安卓兼容 的问题的
    implementation("com.google.android.material:material:1.8.0")
    implementation("androidx.constraintlayout:constraintlayout:2.1.4")
    testImplementation("junit:junit:4.13.2")
    androidTestImplementation("androidx.test.ext:junit:1.1.5")
    androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
}

6.AndroidManifest.xml解析

7. 什么是Activity

相关推荐
pengyu2 小时前
【Kotlin 协程修仙录 · 金丹境 · 中阶】 | 启动密法:CoroutineStart 四种模式与底层调度玄机
android·kotlin
Android小码家3 小时前
Xposed之雷电5+Android 7.1.2 Xposed 89(古早安装)
android·xposed
ooseabiscuit3 小时前
Laravel2.x核心特性全解析
android
UXbot3 小时前
AI一次生成iOS和Android双端原型功能详解
android·前端·ios·kotlin·交互·swift
YF02113 小时前
基于 CRNN 与 ML Kit 的高性能移动端扫描技术方案
android·aigc
耿公子和编程3 小时前
Android 指纹浏览器开发教程一:先把整体架构拆清楚
android·架构
问心无愧05133 小时前
ctf show web入门48
android·前端·笔记
JohnnyDeng943 小时前
Android 渲染机制深度解析:Choreographer 与 VSYNC 如何驱动每一帧
android
赏金术士3 小时前
Kotlin 习题集 · 基础篇
android·开发语言·kotlin
问心无愧05134 小时前
CTF show web入门45
android·前端·笔记