apply plugin: 'com.android.application' android { compileSdkVersion 28 buildToolsVersion "29.0.1" defaultConfig { applicationId "com.zinc.gradlestudy" minSdkVersion 19 targetSdkVersion 28 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } splits { // language { // enable = true // include "es-rMX", "zh", "en" // } // abi { // // 是否开启 // enable true // // // 排除不必要的架构 //// exclude 'x86','arm64-v8a' // // // 重置包含的目录,因为已经是包含全部 //// reset() // // 设置包含,调用前需要先用 reset 将默认清除 //// include 'armeabi-v7a', 'x86' // // // 是否打出包含全部的apk // universalApk true // } // 分辨率 density { // 开启 enable true // 排除分辨率 // exclude 'hdpi', 'ldpi', 'mdpi', 'xhdpi' // 重置默认分辨率列表 // reset() // 包含分辨率 // include 'hdpi', 'xxhdpi' // https://developer.android.com/guide/topics/manifest/compatible-screens-element // 会在 manifest 中添加 compatibleScreens 'small', 'normal', 'large', 'xlarge' } } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'androidx.appcompat:appcompat:1.0.2' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test:runner:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' }