error: cannot find symbol
I have an error while run the app after upgrade to the latest version
[+3694 ms] C:\project\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java:314: error: cannot find symbol
[ ] flutterEngine.getPlugins().add(new dev.fluttercommunity.plus.wakelock.WakelockPlusPlugin());
[ ] symbol: class WakelockPlusPlugin
[ +101 ms] location: package dev.fluttercommunity.plus.wakelock
[ ] 1 error
same issue
i had the same error, after doing
flutter clean
it worked
Please run both flutter clean and flutter pub upgrade, since new library versions may also be using new wakelock_plus_platforn_interface versions. Thanks.
same after flutter clean & flutter pub upgrade ..
nothing changed..
Please run both
flutter cleanandflutter pub upgrade, since new library versions may also be using newwakelock_plus_platforn_interfaceversions. Thanks.
In this case, I'll need a reproducible example project that attempts to build an Android app that uses this plugin.
Flutter 3.27.1 • channel stable • https://github.com/flutter/flutter.git Framework • revision 17025dd882 (3 weeks ago) • 2024-12-17 03:23:09 +0900 Engine • revision cb4b5fff73 Tools • Dart 3.6.0 • DevTools 2.40.2
1.2.9/1.2.10 Confirm. 1.2.8 does not appear.
Happens to me as well. Interestingly, not all people building the same project see such error, and it doesn't happen on Mac. But for me only downgrade to 1.2.8 fixes that.
[√] Flutter (Channel stable, 3.27.2, on Microsoft Windows [Version 10.0.19045.5247], locale en-150)
• Flutter version 3.27.2 on channel stable at c:\Tools\mobile\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 68415ad1d9 (2 days ago), 2025-01-13 10:22:03 -0800
• Engine revision e672b006cb
• Dart version 3.6.1
• DevTools version 2.40.2
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at C:\Users\dmitr\AppData\Local\Android\sdk
• Platform android-34, build-tools 34.0.0
• Java binary at: c:\Program Files\Microsoft\jdk-17.0.13.11-hotspot\bin\java
• Java version OpenJDK Runtime Environment Microsoft-10376486 (build 17.0.13+11-LTS)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[X] Visual Studio - develop Windows apps
X Visual Studio not installed; this is necessary to develop Windows apps.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2024.2)
• Android Studio at C:\Users\dmitr\AppData\Local\Programs\Android Studio 2
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 21.0.3+-12282718-b509.11)
[√] VS Code, 64-bit edition (version 1.96.2)
• VS Code at C:\Program Files\Microsoft VS Code
• Flutter extension version 3.62.0
[√] Connected device (4 available)
• sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64 • Android 15 (API 35) (emulator)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19045.5247]
• Chrome (web) • chrome • web-javascript • Google Chrome 131.0.6778.265
• Edge (web) • edge • web-javascript • Microsoft Edge 131.0.2903.146
[√] Network resources
• All expected network resources are available.
! Doctor found issues in 1 category.
I solved the issue with downgrading
wakelock_plus_platform_interface: 1.2.0
wakelock_plus: 1.2.7