plus_plugins icon indicating copy to clipboard operation
plus_plugins copied to clipboard

[sensors_plus][android] Compilation fails - Redeclaration: StreamHandlerImpl

Open lahdekorpi opened this issue 3 years ago • 5 comments

e: ~/.pub-cache/hosted/pub.dartlang.org/sensors_plus-1.3.2/android/src/main/kotlin/dev/fluttercommunity/plus/sensors/StreamHandlerImpl.kt: (10, 16): Redeclaration: StreamHandlerImpl

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':sensors_plus:compileDebugKotlin'.
> Compilation error. See log for more details

1.3.1 works.
1.3.2 does not.

lahdekorpi avatar May 31 '22 10:05 lahdekorpi

Please use the Bug template to fill a bug report and include all the information in it

miquelbeltran avatar May 31 '22 13:05 miquelbeltran

@lahdekorpi please run flutter clean and then it will be OK now. Actually from my one-day research, this may be a bug of Kotlin incremental compilation. Because I find this will never happen if you turn-off the Kotlin incremental compilation function .

But turning-off the incremental compilation is not a good solution. So just do flutter clean when it occurs.

androidyue avatar May 31 '22 14:05 androidyue

@androidyue flutter clean didn't work for me, but defining a dependency override for sensors_plus to 1.3.1 did. And i even have no sensors_plus in my deps, it's a transitive dependency

dependency_overrides:
  sensors_plus: 1.3.1

lavinov-mercury avatar Jun 01 '22 11:06 lavinov-mercury

In my case, using flutter clean fixes the issue, while using overriden version of 1.3.2 for sensors_plus. Hope it helps @lavinov-mercury

dependency_overrides: 
  sensors_plus: 1.3.2

samuelchanx avatar Jun 10 '22 11:06 samuelchanx

In my case, using flutter clean fixes the issue, while using overriden version of 1.3.2 for sensors_plus. Hope it helps @lavinov-mercury

dependency_overrides: 
  sensors_plus: 1.3.2

This fixed my issue. Thanks!

ShahzaibAyyub avatar Jul 13 '22 07:07 ShahzaibAyyub

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days

github-actions[bot] avatar Dec 28 '22 00:12 github-actions[bot]