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

相关推荐
summerkissyou19871 小时前
Android - 摄像头 - hal - 开发教程,例子,常见问题,分析方法,解决方案
android
summerkissyou19872 小时前
Android 16 架构图
android
神龙天舞20012 小时前
MySQL 备库为什么会延迟好几个小时
android·数据库·mysql
码农coding5 小时前
android12 systemUI 之锁屏
android
圆山猫6 小时前
[Virtualization](三):RISC-V H-extension 与 Guest 执行模式
android·java·risc-v
爱笑鱼6 小时前
Binder(七):getCallingUid() 读到的是谁?clearCallingIdentity() 又清掉了什么?
android
2501_9159090612 小时前
iOS 应用反调试技详解术 检测调试器的原理与防护实践
android·ios·小程序·https·uni-app·iphone·webview
Lvan的前端笔记12 小时前
AndroidX 完全入门指南
android·androidx
帅次13 小时前
Android 应用高级面试:Window 近1年高频追问 18 题
android·面试·职场和发展
总捣什么乱113 小时前
MySQL MySQL是怎么保证主备一致的?
android·mysql·adb