Skip to content

[shared_preferences] Migrate built_in kotlin #186872

@OmarHasan1996

Description

@OmarHasan1996

Steps to reproduce

Flutter build apk

Expected results

No warnings

Actual results

Your app uses the following plugins that apply Kotlin Gradle Plugin (KGP): shared_preferences_android,

Code sample

flutter build apk

Screenshots or Video

Logs

Following plugins that apply Kotlin Gradle Plugin (KGP): appcheck

Future versions of Flutter will fail to build if your app uses plugins that apply KGP.

Here is a guide on filing an issue against a plugin: https://docs.flutter.dev/release/breaking-changes/migrate-to-built-in-kotlin/for-app-developers#report-incompatible-kotlin-gradle-plugin-usage-to-plugin-authors

Flutter Doctor output

% flutter doctor -v
[✓] Flutter (Channel stable, 3.44.0, on macOS 26.2 25C56 darwin-arm64, locale en-AE) [251ms]
• Flutter version 3.44.0 on channel stable at /Users/compass/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 559ffa3 (6 days ago), 2026-05-15 14:13:13 -0700
• Engine revision 4c525da
• Dart version 3.12.0
• DevTools version 2.57.0
• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets, enable-swift-package-manager,
omit-legacy-version-file, enable-lldb-debugging, enable-uiscene-migration

[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0) [1,064ms]
• Android SDK at /Users/compass/Library/Android/sdk
• Emulator version 36.4.10.0 (build_id 15004761) (CL:N/A)
• Platform android-36.1, build-tools 36.0.0
• ANDROID_HOME = /Users/compass/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
This is the JDK bundled with the latest Android Studio installation on this machine.
To manually set the JDK path, use: flutter config --jdk-dir="path/to/jdk".
• Java version OpenJDK Runtime Environment (build 21.0.9+-14787801-b1163.94)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 26.2) [569ms]
• Xcode at /Applications/Xcode-26.2.0.app/Contents/Developer
• Build 17C52
• CocoaPods version 1.16.2

[✓] Chrome - develop for the web [5ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Connected device (4 available) [6.1s]
• iPhone (mobile) • 00008120-001E25622E44201E • ios • iOS 18.5 22F76
• iPhone 15 Pro Max (mobile) • 28669CA2-A7EB-4FA8-B5C7-EC7712D1933D • ios • com.apple.CoreSimulator.SimRuntime.iOS-18-0 (simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 26.2 25C56 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 148.0.7778.168

[✓] Network resources [936ms]
• All expected network resources are available.

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: pluginsSupport for writing, building, and running plugin packagesplatform-androidAndroid applications specificallyteam-androidOwned by Android platform team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions