0

I get this exception at the startup of the app. UnsupportedError (Unsupported operation: Loaded ObjectBox core dynamic library has unsupported version 0.18.1, expected ^0.19.0)

Flutter 3.15.0-15.2.pre • channel beta • https://github.com/flutter/flutter.git
Framework • revision 0d074ced6c (3 hours ago) • 2023-09-21 10:24:15 -0700
Engine • revision 453411bcf3
Tools • Dart 3.2.0 (build 3.2.0-134.1.beta) • DevTools 2.27.0
sdk: '>=3.0.0 <4.0.0'

objectbox: ^2.1.0
objectbox_flutter_libs: ^2.1.0
objectbox_generator: ^2.1.0

I tried it on Windows and Linux and tried the following script like they say in their docs.

bash <(curl -s https://raw.githubusercontent.com/objectbox/objectbox-dart/main/install.sh) In windows I copied the files to System32 and in Linux it installs the .so file globally but it does not work on either platform.

Edit: Same problem with the objectbox example projects.

4 Answers 4

1

Downgrade the Pub Cache Dart version of object box to 2.0.0 it will works

Sign up to request clarification or add additional context in comments.

Comments

1

2.3.0 does not work with Android.

Downgrading to 2.2.0 solved the problem.

objectbox: 2.2.0 (whithout the ^)

GitHub issue

Comments

0

This issue was fixed with release 2.3.1. Run flutter pub upgrade and you should be good.

Comments

0

The updated Android Objecybox library should fix this problem.

You can find this issue and solution on GitHub

https://github.com/objectbox/objectbox-dart/issues/499#issuecomment-1376840360

\android\app\build.gradle

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    // Add objectbox-android-objectbrowser only for debug builds.
    // Warning: when objectbox_flutter_libs updates check if version
    // needs update, e.g. check https://github.com/objectbox/objectbox-dart/releases.
   def objectboxVersion = "3.7.0"
    debugImplementation("io.objectbox:objectbox-android-objectbrowser:$objectboxVersion")
    releaseImplementation("io.objectbox:objectbox-android:$objectboxVersion")

}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.