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

相关推荐
木叶丸30 分钟前
跨平台方案该如何选择?
android·前端·ios
顾林海1 小时前
Android ClassLoader加载机制详解
android·面试·源码
用户2018792831671 小时前
🎨 童话:Android画布王国的奇妙冒险
android
whysqwhw2 小时前
OkHttp框架的全面深入架构分析
android
你过来啊你2 小时前
Android App冷启动流程详解
android
泓博2 小时前
KMP(Kotlin Multiplatform)改造(Android/iOS)老项目
android·ios·kotlin
移动开发者1号3 小时前
使用Baseline Profile提升Android应用启动速度的终极指南
android·kotlin
移动开发者1号3 小时前
解析 Android Doze 模式与唤醒对齐
android·kotlin
菠萝加点糖5 小时前
Kotlin Data包含ByteArray类型
android·开发语言·kotlin
IAM四十二9 天前
Google 端侧 AI 框架 LiteRT 初探
android·深度学习·tensorflow