Flutter build apk命令抛出错误且未构建apk

时间:2020-05-08 14:40:19

标签: java android flutter gradle

我正在尝试使用Flutter构建apk,但是每当我运行flutter build apk --release命令时,这就是我得到的错误。

enter image description here

我使用的Java版本是Java 8,但是使用cmd检查该版本会显示此版本

java version "1.8.0_202" Java(TM) SE Runtime Environment (build 1.8.0_202-b08) Java HotSpot(TM) 64-Bit Server VM (build 25.202-b08, mixed mode)

最初我安装了Java 12,但是flutter抛出了错误。

MainActivity.kt文件的内容

package com.example.starter

import androidx.annotation.NonNull;
import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugins.GeneratedPluginRegistrant

class MainActivity: FlutterActivity() {
    override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
        GeneratedPluginRegistrant.registerWith(flutterEngine);
    }
}

0 个答案:

没有答案