让 Android 发布包能够编译

Build.SUPPORTED_ABIS.firstOrNull 要按函数调用,否则 Kotlin 在打 release APK 时失败。应用标识和签名配置没有改。

Co-authored-by: yanjiu0721 <yanjiu0721@users.noreply.github.com>
This commit is contained in:
Cursor Agentandyanjiu0721 committed 2026-11-21 12:04:45 +00:00
1 parent 8cdc0f436f
commit 340bdbd9e8
1 file changed
+1 -1
@@ -15,7 +15,7 @@ class MainActivity : FlutterActivity() {
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, "dev.netquality/platform") MethodChannel(flutterEngine.dartExecutor.binaryMessenger, "dev.netquality/platform")
.setMethodCallHandler { call, result -> .setMethodCallHandler { call, result ->
when (call.method) { when (call.method) {
"abi" -> result.success(Build.SUPPORTED_ABIS.firstOrNull ?: "") "abi" -> result.success(Build.SUPPORTED_ABIS.firstOrNull() ?: "")
"installApk" -> { "installApk" -> {
val path = call.argument<String>("path") val path = call.argument<String>("path")
if (path.isNullOrEmpty()) { if (path.isNullOrEmpty()) {