Skip to content

Java Plugin template doesn't compile #50480

@gaaclarke

Description

@gaaclarke

Steps to reproduces:

  1. flutter create -t plugin -i objc -a java JavaTest
  2. open "JavaTest/android" with Android Studio
  3. Notice the error Minimum supported Gradle version is 5.4.1. Current version is 4.10.2
  4. Press the 'fix and re-import` button
  5. Build the project, notice it doesn't build reporting errors

Errors:

It looks like everything stems from not being able to find androidx.annotation.NonNull

com/example/JavaTest/JavaTestPlugin.java |  
-- | --
error: cannot find symbol class NonNull |  
error: package io.flutter.embedding.engine.plugins does not exist |  
error: package io.flutter.plugin.common does not exist |  
error: package io.flutter.plugin.common does not exist |  
error: package io.flutter.plugin.common.MethodChannel does not exist |  
error: package io.flutter.plugin.common.MethodChannel does not exist |  
error: package io.flutter.plugin.common.PluginRegistry does not exist |  

Notes:

  • I tried to run the refactor tool to migrate to androidx and it performed a no-op

Doctor:

[✓] Flutter (Channel master, v1.14.6-pre.237, on Mac OS X 10.14.6 18G2022, locale en-US)
    • Flutter version 1.14.6-pre.237 at /Users/aaclarke/dev/flutter
    • Framework revision 6dc3bfaa98 (3 days ago), 2020-02-07 18:28:02 -0800
    • Engine revision 6158f03ef5
    • Dart version 2.8.0 (build 2.8.0-dev.8.0 514a8d4c84)

cc @blasten

Metadata

Metadata

Assignees

No one assigned

    Labels

    toolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions