plugins { id 'com.android.application' id 'com.chaquo.python' } android { namespace 'com.maipulse.app' compileSdk 34 defaultConfig { applicationId "com.maipulse.app" minSdk 24 targetSdk 34 versionCode 1 versionName "1.0" ndk { abiFilters "arm64-v8a" } // Chaquopy 16 的 DSL 挂在 android.defaultConfig 下面 python { buildPython "C:/Users/20558/AppData/Local/Programs/Python/Python38/python.exe" pip { install "flask" install "requests" install "pycryptodome" } } } // 固定 keystore:AGP 默认会在 $HOME/.android 下自动生成一个, // 而 zipalign 之后我们要用 apksigner 重签。两边不是同一个 key 的话, // 出来的包签名不一样,用户必须卸载才能覆盖安装。 signingConfigs { debug { storeFile file("../maipulse-debug.keystore") storePassword "android" keyAlias "androiddebugkey" keyPassword "android" } } buildTypes { debug { signingConfig signingConfigs.debug } release { minifyEnabled false } } compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 } androidResources { noCompress 'json', 'png' } } dependencies { implementation 'androidx.core:core:1.12.0' }