Relative Content

Tag Archive for androidflutterkotlin

Unresolved reference: registerForActivityResult in FlutterFragmentActivity

I have been getting this error in my MainActivity.kt for almost a week now, and still haven’t found a solution that work.
The error is “Unresolved reference: registerForActivityResult” with registerForActivityResult underlined in red. It’s the only error there is found in my build. I’m using FlutterFragmentActivity as this is the closest solution i could get, but still not moving the error away.

Android 14 device keeps crashing on startup after Kotlin upgrade

I’m having issues upgrading my flutter solution properly. A requirement to upgrade a flutter package to a newer version led to upgrading my flutter and dart version, and eventually my gradle and kotlin version. The upgrade worked fine on emulators but my app seems to keep crashing on startup on real devices, but only on Android 14 devices. Looking at LogCat’s logs I see the following message:

Kotlin Version Mismatch Error When Building APK in Flutter Project

I am encountering a Kotlin version mismatch error when trying to build an APK for my Flutter project. The errors indicate that some modules were compiled with Kotlin 1.8.0, but my project expects version 1.6.0. Despite multiple attempts to resolve this issue, I continue to see the following errors: