Closed linememory closed 7 months ago
Downgrade to 2.2.0 works but remove the caret syntax ^2.2.0
dependencies:
flutter:
sdk: flutter
# Do not use caret syntax: objectbox: ^2.2.0
objectbox: 2.2.0
objectbox_sync_flutter_libs: 2.2.0
objectbox_generator: 2.2.0
https://github.com/objectbox/objectbox-dart/issues/309#issuecomment-1729572003
Same problem with 2.2.0
Same problem with 2.2.0
And 2.1.0 too?
try to remove the caret syntax ^ from ^2.2.0. This worked for me.
Oh my bad. Now it works. Forgot to remove the caret.
was wondering why need to downgrade? is 2.3.0 can't be use?
Because Objectbox 2.3.0 does not work on Android. See error in original post.
Confirmed, v2.2.1 works, v2.3.0 throws this error on Android.
Please check 2.3.1-dev.0 if it works for you...
Sorry, discovered some bug, dev.1 coming soon...
2.3.1-dev.1 seems good, as soon as we have some external confirmation, this will become 2.3.1. So let us know...
2.3.1-dev.1 seems good, as soon as we have some external confirmation, this will become 2.3.1. So let us know...
2.3.1-dev.1 works on Android, the error we had with 2.3.0 is gone.
2.3.1 is published with a fix.
I am still getting this issue on Android with 2.3.1, even after i cleaned everything. Flutter 3.16.0
@hongfeiyang Can you please share how your project is set up and more details (e.g. feel free to open a new issue and refer to this one)? Otherwise we can't really find out why this still happens for you.
@hongfeiyang Can you please share how your project is set up and more details (e.g. feel free to open a new issue and refer to this one)? Otherwise we can't really find out why this still happens for you.
in pubspec:
objectbox: ^2.3.1
objectbox_flutter_libs: any
'objectbox_generator: any'
pubspec.lock
objectbox:
dependency: "direct main"
description:
name: objectbox
sha256: "4b645c71771b87188442143a50c55ab238a8e60fe367b6a0968c0842292ffb30"
url: "https://pub.dev"
source: hosted
version: "2.3.1"
objectbox_flutter_libs:
dependency: "direct main"
description:
name: objectbox_flutter_libs
sha256: e9a3d8e3ce0d47d6fc942921ef0444a238cd4258e8fcefe13b994cf984a8bf61
url: "https://pub.dev"
source: hosted
version: "2.3.1"
objectbox_generator:
dependency: "direct dev"
description:
name: objectbox_generator
sha256: aaffef7eb51b4d911bb00a7c52b19b55fe3e5a69de8ec56552cf35550a1e9beb
url: "https://pub.dev"
source: hosted
version: "2.3.1"
build.gradle
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
// Add objectbox-android-objectbrowser only for debug builds.
// Replace <version> with the included objectbox-android version,
// e.g. check https://github.com/objectbox/objectbox-dart/releases
// Warning: when ObjectBox for Dart updates check if <version>
// needs to be updated.
debugImplementation("io.objectbox:objectbox-android-objectbrowser:3.5.1")
}
...
configurations {
all {
exclude group: 'androidx.lifecycle', module: 'lifecycle-viewmodel-ktx'
}
// Tell Gradle to exclude the objectbox-android dependency
// that is added by objectbox_flutter_libs for debug builds.
debugImplementation {
exclude group: 'io.objectbox', module: 'objectbox-android'
}
}
def compileSDKVersion = 33
if ((flutter.compileSdkVersion as int) > 33) {
compileSDKVersion = flutter.compileSdkVersion as int
}
def minSDKVersion = flutter.minSdkVersion as int
if (minSDKVersion < 24) {
minSDKVersion = 24
}
those are the important settings. Project was working fine before on 2.2.0 until I pub upgrade auto updates it to 2.3.1 clean project and rebuild does not work pub cache repair does not work either Windows, Flutter 3.16.0, Android SDK API 34
It is too hard to describe the entire setup, let me know what do you need to look into this issue
Also for iOS I know that pod updates it to 0.19.0 in podfile.lock, but for android I dont even know if there exist a thing like that to check the installed version
@hongfeiyang Try to update the objectbox-android-objectbrowser
dependency to the one listed in the release notes, e.g. for 2.3.1 it should be at least 3.7.0
.
Thanks! will give it a go
Sent from Gmail Mobile
On Mon, 20 Nov 2023 at 7:25 pm, Uwe - ObjectBox @.***> wrote:
@hongfeiyang https://github.com/hongfeiyang Try to update the objectbox-android-objectbrowser dependency to the one listed in the release notes, e.g. for 2.3.1 https://github.com/objectbox/objectbox-dart/releases/tag/v2.3.1 it should be at least 3.7.0.
— Reply to this email directly, view it on GitHub https://github.com/objectbox/objectbox-dart/issues/563#issuecomment-1818442039, or unsubscribe https://github.com/notifications/unsubscribe-auth/AETIN4FZWTVSQEIZX4XDFTTYFMHYBAVCNFSM6AAAAAA5DEGIZSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJYGQ2DEMBTHE . You are receiving this because you were mentioned.Message ID: @.***>
@hongfeiyang Try to update the
objectbox-android-objectbrowser
dependency to the one listed in the release notes, e.g. for 2.3.1 it should be at least3.7.0
.
Thanks this solves the problem :)
I always get the following error. I tried it with the objectbox examples like objectbox_demo_relations
This happens on Windows and on linux on a Lenovo Thinkpad yoga from 2017. I can not test it on an other machine atm. I used
bash <(curl -s https://raw.githubusercontent.com/objectbox/objectbox-dart/main/install.sh)
to install the shared library and also downloaded the 0.19.0 and put it in /usr/lib and on Windows 11 in System32. I installed flutter manually.flutter doctor