plugins { id 'com.android.application' id 'org.jetbrains.kotlin.android' } android { namespace 'com.example.deviceagent' compileSdk 34 defaultConfig { applicationId "com.example.deviceagent" minSdk 29 // Android 10;剪贴板限制就是从这一版开始的 targetSdk 34 versionCode 4 versionName "1.3" } buildTypes { release { minifyEnabled false // 工具类 App,不混淆(方便排查) proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } debug { applicationIdSuffix "" } } compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 } kotlinOptions { jvmTarget = '17' } // 设备都是 arm64,只出一个架构的包,构建快、体积小 splits { abi { enable false } } } dependencies { // 刻意只引一个 androidx.core:只为 FileProvider(把下载的 APK 授权给系统安装器读)。 // HTTP 用 HttpURLConnection、JSON 用 org.json(都是系统内置),不引网络/序列化库—— // 依赖越少,构建越快、出问题越好排查。 implementation 'androidx.core:core-ktx:1.13.1' }