Skip to content

plugin_test_android_variants builder fails when jni is migrated to built-in kotlin #190084

Closed
dart-lang/native
#3501

Description

@jesswrd

plugin_test_android_variants builder fails (https://ci.chromium.org/ui/p/flutter/builders/prod/Linux%20plugin_test_android_variants/4862/overview) when the newly released dart jni package is migrated to the built-in kotlin workaround here

They followed these flutter docs: https://docs.flutter.dev/release/breaking-changes/migrate-to-built-in-kotlin/for-plugin-authors#support-flutter-versions-earlier-than-3-44

Before closing this issue make sure to un-suppress the suppressed tests in flutter dashboard.

Activity

  1. self-assigned this
    on Jul 27, 2026
  2. added
    team-androidOwned by Android platform team
    P1High-priority issues at the top of the work list
    triaged-androidTriaged by Android platform team
    on Jul 27, 2026
  3. added
    P0Critical issues such as a build break or regression
    and removed
    P1High-priority issues at the top of the work list
    on Jul 27, 2026
  4. jmagman commented on Jul 27, 2026

    @jmagman
    Member

    Failure happening on multiple tests, but the common logs are related to jni package and Could not find method kotlin() for arguments:

    [2026-07-27 09:05:25.598345] [STDOUT] stdout: [ +294 ms] > Configure project :jni
     [2026-07-27 09:05:25.600138] [STDOUT] stdout: [        ] Evaluating project ':jni' using build file '/b/s/w/ir/x/w/.pub-cache/hosted/pub.dev/jni-1.0.1/android/build.gradle'.
     [2026-07-27 09:05:25.600312] [STDOUT] stdout: [        ] Using default execution profile
     [2026-07-27 09:05:25.600436] [STDOUT] stdout: [        ] Build 6630c755-4d31-4cbf-9bec-fb874c51ee55 is closed
     [2026-07-27 09:05:25.601175] [STDOUT] stdout: [        ] Build 74ee0061-e233-4b92-8fa0-5cd1563a7d2b is closed
     [2026-07-27 09:05:25.601344] [STDOUT] stdout: [        ] [Incubating] Problems report is available at: file:///b/s/w/ir/x/t/flutter_devicelab_plugin_test.LUDCKZ/plugintestapp/android/build/reports/problems/problems-report.html
     [2026-07-27 09:05:25.601936] [STDOUT] stderr: [        ] FAILURE: Build failed with an exception.
     [2026-07-27 09:05:25.601968] [STDOUT] stderr: [   +3 ms] * Where:
     [2026-07-27 09:05:25.602970] [STDOUT] stderr: [        ] Build file '/b/s/w/ir/x/w/.pub-cache/hosted/pub.dev/jni-1.0.1/android/build.gradle' line: 84
     [2026-07-27 09:05:25.603007] [STDOUT] stderr: [        ] * What went wrong:
     [2026-07-27 09:05:25.603018] [STDOUT] stderr: [        ] A problem occurred evaluating project ':jni'.
     [2026-07-27 09:05:25.603105] [STDOUT] stderr: [        ] > Could not find method kotlin() for arguments [build_d37lsm53uvr9nuahcugnd5f95$_run_closure3@45e476cf] on project ':jni' of type org.gradle.api.Project.
     [2026-07-27 09:05:25.603183] [STDOUT] stderr: [        ] * Try:
     [2026-07-27 09:05:25.603253] [STDOUT] stderr: [        ] > Run with --debug option to get more log output.
     [2026-07-27 09:05:25.603316] [STDOUT] stderr: [        ] > Run with --scan to get full insights from a Build Scan (powered by Develocity).
     [2026-07-27 09:05:25.603391] [STDOUT] stderr: [        ] > Get more help at https://help.gradle.org/.
     [2026-07-27 09:05:25.603475] [STDOUT] stderr: [        ] * Exception is:
    
  5. CodeDoctorDE commented on Jul 27, 2026

    @CodeDoctorDE
    Contributor

    I also had this problem which happens when migrating to agb like on the flutter docs: https://docs.flutter.dev/release/breaking-changes/migrate-to-built-in-kotlin/for-plugin-authors#support-flutter-versions-earlier-than-3-44 (select groovy). I can't say it for sure but i think the kotlin dsl hadnt this problem.

    I fixed it like this: https://github.com/LinwoodDev/Butterfly/blob/b4c5e18b3b2d5fff9540f8380207f8e94cd26b56/app/android/build.gradle.kts#L23

  6. changed the title [-]`plugin_test_android_variants` fails when jni is migrated to built-in kotlin[/-] [+]`plugin_test_android_variants` builder fails when jni is migrated to built-in kotlin[/+] on Jul 27, 2026
  7. github-actions commented on Aug 11, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  8. locked as resolved and limited conversation to collaborators on Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P0Critical issues such as a build break or regressiondependency: dartDart team may need to help usteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions