Skip to content

Remove KGP from Android dependencies #2917

Description

@gopalmak

Which packages are you using?

stream_chat_flutter

On what platforms did you experience the issue?

Android

What version are you using?

`environment:
sdk: ^3.12.0

dependencies:
flutter:
sdk: flutter

cupertino_icons: ^1.0.8
stream_chat_flutter: ^10.3.0

What happened?

`PS D:\AndroidProjects\stream_chat_demo> flutter build apk --release
WARNING: Your app uses the following plugins that apply Kotlin Gradle Plugin (KGP): desktop_drop, device_info_plus, file_picker, package_info_plus, photo_manager, record_android, share_plus, wakelock_plus
Future versions of Flutter will fail to build if your app uses plugins that apply KGP.

Please check the changelogs of these plugins and upgrade to a version that supports Built-in Kotlin.
If no such version exists, report the issue to the plugin. If necessary, 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

If you are a plugin author, please migrate your plugin to Built-in Kotlin using this guide: https://docs.flutter.dev/release/breaking-changes/migrate-to-built-in-kotlin/for-plugin-authors
Font asset "MaterialIcons-Regular.otf" was tree-shaken, reducing it from 1645184 to 1368 bytes (99.9% reduction). Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app.
D:\AndroidProjects\stream_chat_demo\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java:39: error: cannot find symbol
flutterEngine.getPlugins().add(new com.mr.flutter.plugin.filepicker.FilePickerPlugin());
^
symbol: class FilePickerPlugin
location: package com.mr.flutter.plugin.filepicker
1 error

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:compileReleaseJavaWithJavac'.

Compilation failed; see the compiler output below.
D:\AndroidProjects\stream_chat_demo\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java:39: error: cannot find symbol
flutterEngine.getPlugins().add(new com.mr.flutter.plugin.filepicker.FilePickerPlugin());
^
symbol: class FilePickerPlugin
location: package com.mr.flutter.plugin.filepicker
1 error

  • Try:

Check your code and dependencies to fix the compilation error(s)
Run with --scan to generate a Build Scan (Powered by Develocity).

BUILD FAILED in 10m 58s
Running Gradle task 'assembleRelease'... 659.2s
Gradle task assembleRelease failed with exit code 1`

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions