Error: PlatformException(no_fragment_activity, local_auth plugin requires activity to be a FragmentActivity., null)

This is what I did to solve this issue.

Change your MainActivity.kt as below:

package com.[your.package]

import androidx.annotation.NonNull
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)
    }
}

However, after changing this MainActivity.kt, I also faced some other issue with the Theme.AppCompat. Check this out https://gist.github.com/akifarhan/f70a2c777651f2ea61a15eb92a5939c1 for the solution.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)