Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsupported operation ObjectBox platform-specific library not compatible #690

Open
jeremy-giles opened this issue Oct 25, 2024 · 5 comments
Assignees

Comments

@jeremy-giles
Copy link

jeremy-giles commented Oct 25, 2024

Hello, I can't understand why all morning I can build and launch our application on Android devices and how following a pull action from our git I have the error:

I/flutter ( 6701): Unsupported operation: ObjectBox platform-specific library not compatible: is 4.0.0 (4.0.0-2024-05-14 (http, admin, lmdb, VectorSearch)), expected 4.0.1 (4.0.2-2024-10-15) or newer. For Flutter, check if the ObjectBox Pod or objectbox-android-objectbrowser need to be updated. For Dart, re-run the install.sh script to download the latest version.

NB: The problem is only in debug. The application built in release works...

pubspec.yaml

dependencies:
  
  flutter:
    sdk: flutter
  objectbox: ^4.0.0
  objectbox_flutter_libs: any

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_lints: ^3.0.0
  objectbox_generator: any

build.gradle

// Tell Gradle to exclude the objectbox-android dependency
// that is added by objectbox_flutter_libs for debug builds.
configurations {
    debugImplementation {
        exclude group: 'io.objectbox', module: 'objectbox-android'
    }
}

dependencies {
    // 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:4.0.0")
}
@jeremy-giles jeremy-giles added the bug Something isn't working label Oct 25, 2024
@greenrobot-team
Copy link
Member

greenrobot-team commented Oct 28, 2024

For Flutter, check if the ObjectBox Pod or objectbox-android-objectbrowser need to be updated.

In the build.gradle posted, update objectbox-android-objectbrowser to a supported release as noted in the comment.

Note: I labeled this issue with "more info required" so it will auto-close in a few days if there are no follow-up comments.

@greenrobot-team greenrobot-team added the more info required Needs more info to become actionable. Auto-closed if no response. label Oct 28, 2024
@sadespresso
Copy link

sadespresso commented Oct 28, 2024

Hello there! I'm having the same issue even tho I have set following:

# pubspec.yaml

dependencies:
  objectbox: ^4.0.1
  objectbox_flutter_libs: ^4.0.1
// app/build.gradle

configurations {
    debugImplementation {
        exclude group: 'io.objectbox', module: 'objectbox-android'
    }
}

dependencies {
    debugImplementation("io.objectbox:objectbox-android-objectbrowser:4.0.1")
}

@sadespresso
Copy link

sadespresso commented Oct 28, 2024

I'm trying to compile flutter android app on a Mac (macos 15). Additionally, I can't install libobjectbox dynamic library due to:

OK. Do you want to install the library into /usr/local/lib? [Y/n] 
Installing /usr/local/lib/libobjectbox.dylib
Password:
ls: /usr/local/lib/*: Not a directory
Error installing the library - not found

Should I need to create a separate issue for this, or is this a related issue? I'm little puzzled because I can build and debug my flutter app for iOS just fine.

@github-actions github-actions bot removed the more info required Needs more info to become actionable. Auto-closed if no response. label Oct 29, 2024
@jeremy-giles
Copy link
Author

jeremy-giles commented Oct 29, 2024

Thx for your response. I build too on Mac (M2 Max - Sonoma 14.5).
I don't see what additional information I can give. My colleagues, on the same project BUT on Windows environments, do not have this problem, even in debug.

Other info, similar error during iOS build:

Error: The pod "ObjectBox" required by the plugin "objectbox_flutter_libs" requires a higher minimum iOS deployment version than the plugin's reported minimum version.
To build, remove the plugin "objectbox_flutter_libs", or contact the plugin's developers for assistance.

@greenrobot-team
Copy link
Member

greenrobot-team commented Oct 29, 2024

It's maybe a little bit hidden in the release notes, but the version should be 4.0.3:

If you are using Admin, make sure to update to io.objectbox:objectbox-android-objectbrowser:4.0.3 in android/app/build.gradle.

As for the macOS issue: installing the library is only necessary for Dart Native projects or for Flutter projects where unit tests run on your machine (see notes in Getting Started docs). The Flutter apps themselves bundle the ObjectBox native library via the objectbox_flutter_libs package. Regardless, the script does not appear to account for a not existing path in newer macOS versions.

@jeremy-giles If this is a different issue, please submit a new issue with details!

Note: I labeled this issue with "more info required" so it will auto-close in a few days if there are no follow-up comments.

@greenrobot-team greenrobot-team added more info required Needs more info to become actionable. Auto-closed if no response. and removed bug Something isn't working labels Oct 29, 2024
@greenrobot-team greenrobot-team self-assigned this Oct 29, 2024
@github-actions github-actions bot removed the more info required Needs more info to become actionable. Auto-closed if no response. label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants