it营大地专栏

flutter local_auth plugin requires activity to be a FragmentActivity 如何解决

发布于 2 个月前 作者 phonegap100 265 次浏览 来自 问答

flutter local_auth plugin requires activity to be a FragmentActivity 如何解决

1 回复

找到 MainActivity

package com.itying.flutter_app

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

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

回到顶部