objectbox / objectbox-dart

Flutter database for super-fast Dart object persistence
https://docs.objectbox.io/getting-started
Apache License 2.0
927 stars 115 forks source link

error when updating to news version of object box #558

Closed rodriger06 closed 8 months ago

rodriger06 commented 8 months ago

hi Team,

My app was working when i have object box version 2.0.0. I upgraded to the new version 2.2.1 and now my application is not working i get the following error. How can I fix this? thanks in advance

  objectbox: ^2.2.1
  objectbox_flutter_libs: ^2.2.1

Running Gradle task 'assembleDebug'...
e: C:\Users\elmas\AppData\Local\Pub\Cache\hosted\pub.dev\objectbox_flutter_libs-2.0.0\android\src\main\kotlin\io\objectbox\objectbox_flutter_libs\ObjectboxFlutterLibsPlugin.kt: (12, 7): Redeclaration: ObjectboxFlutterLibsPlugin
e: C:\Users\elmas\AppData\Local\Pub\Cache\hosted\pub.dev\objectbox_flutter_libs-2.2.1\android\src\main\kotlin\io\objectbox\objectbox_flutter_libs\ObjectboxFlutterLibsPlugin.kt: (13, 7): Redeclaration: ObjectboxFlutterLibsPlugin

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':objectbox_flutter_libs:compileDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Compilation error. See log for more details
greenrobot-team commented 8 months ago

A flutter clean should fix this!

Edit: there are left-over files from the last release that need to be cleaned. It's typically a good idea to do this on upgrades.

rodriger06 commented 8 months ago

it works thanks

greenrobot-team commented 8 months ago

Closing this then.