flutter local_auth plugin requires activity to be a FragmentActivity 如何解决
flutter local_auth plugin requires activity to be a FragmentActivity 如何解决
1 回复
更多关于flutter local_auth plugin requires activity to be a FragmentActivity 如何解决的实战系列教程也可以访问 https://www.itying.com/category-92-b0.html
找到 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);
}
}