MixinNetwork / MixinNetwork/flutter-plugins

[desktop_drop] flutter run --release error

Open
#394 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
512
Forks
292
Avg merge
15h 8m
Merged PRs (30d)
7

Description

Hi, I ran into problems running the release mode when using desktop_drop 0.5.0, and this problem also occurs when building apk with flutter.
The release mode run, compiler error.
The debug mode is running, and the compilation succeeds.
Obfuscation is off minifyEnabled false.

Reproduce Steps

Steps to reproduce the behavior:

  1. run flutter run --release
  2. build error
android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java:19: 错误: 找不到符号
      flutterEngine.getPlugins().add(new one.mixin.desktop.drop.DesktopDropPlugin());
                                                               ^
  符号:   类 DesktopDropPlugin
  位置: 程序包 one.mixin.desktop.drop
1 个错误

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

Expected behavior

Compile successfully.

Version (please complete the following information):

  • Flutter Version: v3.27.4
  • OS: build on macOS 15.1.1, run target android.
  • plugin: desktop_drop: 0.5.0
❯ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel [user-branch], 3.27.4, on macOS 15.1.1 24B91 darwin-x64, locale zh-Hans-CN)
    ! Flutter version 3.27.4 on channel [user-branch] at /Users/liurichao/development/flutter
      Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
      If that doesn't fix the issue, reinstall Flutter by following instructions at
      https://flutter.dev/setup.
    ! Upstream repository unknown source is not the same as FLUTTER_GIT_URL
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.1)
[✓] VS Code (version 1.97.2)
[✓] Connected device (5 available)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with desktop_drop 0.5.0 using flutter run --release or an Android APK build, then inspect the generated android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java reference to DesktopDropPlugin. Compare the release and debug build behavior; done means the release run and APK compilation succeed on the reported Flutter and Android setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, dart, flutter
Domain
build-system, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.