关于android:安卓逆向-34-AndroidStudio工程目录结构

2次阅读

共计 2866 个字符,预计需要花费 8 分钟才能阅读完成。

  • gradle -> wrapper -> gradle-wrapper.properties 配置我的项目 gradle 版本
  • build.gradle 形容工程整体的编译规定
  • gradle.properties gradle 配置文件,个别毋庸改变
  • local.properties 本机环境配置,SDK、NDK 门路等,个别毋庸改变
  • settings.gradle 配置哪些模块在一起编译 include ‘:app’ 只编译 app

APP

  • app -> build.gradle 形容以后模块的编译规定
  • app -> build -> outputs -> apk -> debug/release 生成的 apk 的寄存地位
  • app -> build -> intermediates -> cmake -> debug/release -> obj 生成的 so 寄存地位
  • libs 模块中应用了第三方 jar 的时候,会放这里
src -> main -> cpp      C/C++ 代码
               java     Java 代码 
  • src -> proguard-rules.pro Java 代码混同规定
  • src -> main -> res -> drawable 用来放图片
  • src -> main -> res -> layout 用来放布局文件
  • src -> main -> res -> mipmap-hdpi 用来放利用图片,不同屏幕的适配图标
  • src -> main -> res -> values strings.xml、public.xml
  • src -> main -> AndroidManifest.xml 清单文件,app 的 icon 图标、四大组件的注册、权限申请、指明程序入口

build.gradle 课件版本

plugins {id 'com.android.application'}

android {
    // 指定编译用的 SDK 版本号
    compileSdkVersion 30
    // 指定编译工具的版本号,结尾两位数字必须与 compileSdkVersion 统一。具体版本号可在 sdk 装置目录 SDK\build-tools 下找到
    buildToolsVersion "30.0.3"

    defaultConfig {
        //app 包名
        applicationId "com.xiaojianbang.hashmaptest"
        //app 适宜运行的最小 SDK 版本号
        minSdkVersion 16
        // 指标设施的 SDK 版本号,即 app 心愿在哪个版本下运行
        targetSdkVersion 30
        //app 利用版本号
        versionCode 1
        //app 利用版本名称
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            // 是否开启代码混同性能
            minifyEnabled false
            // 指定代码混同规定文件名
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}
// 配置 app 编译所需依赖
dependencies {
    
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'com.google.android.material:material:1.2.1'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
    api 'com.squareup.okhttp3:okhttp:3.10.0'

}

build.gradle 本人复制的

plugins {id 'com.android.application'}

android {
    // 指定编译用的 SDK 版本号
    compileSdk 31

    defaultConfig {
        //app 包名
        applicationId "com.hengdi.hookdemo"
        //app 适宜运行的最小 SDK 版本号
        minSdk 21
        // 指标设施的 SDK 版本号,即 app 心愿在哪个版本下运行
        targetSdk 31
        //app 利用版本号
        versionCode 1
         //app 利用版本名称
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        // c++ 我的项目  会有对应的 c ++ 版本
        externalNativeBuild {
            cmake {cppFlags '-std=c++11'}
        }
    }

    buildTypes {
        release {
            // 是否开启代码混同性能
            minifyEnabled false
            // 指定代码混同规定文件名
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    externalNativeBuild {
        cmake {
            // cmake 列表
            path file('src/main/cpp/CMakeLists.txt')
            version '3.10.2'
        }
    }
    buildFeatures {viewBinding true}
}
// 配置 app 编译所需依赖
dependencies {

    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'com.google.android.material:material:1.3.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}
正文完
 0