Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cast to Fragment Activity #15

Closed
alishe79 opened this issue Jun 13, 2021 · 2 comments
Closed

cast to Fragment Activity #15

alishe79 opened this issue Jun 13, 2021 · 2 comments

Comments

@alishe79
Copy link

alishe79 commented Jun 13, 2021

in my project , run

FlutterLocker.save(SaveSecretRequest("passCode", "passCodeSecret", AndroidPrompt("Authenticate", "Cancel")));

but get exception under error

Unhandled Exception: PlatformException(error, com.bibtel.MainActivity cannot be cast to androidx.fragment.app.FragmentActivity, null, java.lang.ClassCastException: com.bibtel.MainActivity cannot be cast to androidx.fragment.app.FragmentActivity

how fix it.

me noob in the flutter.

@itsJoKr
Copy link
Contributor

itsJoKr commented Jul 2, 2021

Go to /android/app/src/main/kotlin(java)/com/**/MainActivity and change:

import io.flutter.embedding.android.FlutterActivity to import io.flutter.embedding.android.FlutterFragmentActivity
and FlutterActivity to FlutterFragmentActivity

@itsJoKr itsJoKr closed this as completed Jul 2, 2021
@dnaicker
Copy link

dnaicker commented Aug 8, 2022

Could this be added to the main source files?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants