[英]Flutter: CocoaPods could not find compatible versions for pod "ObjectBox"
I'm using OjbectBox for the first time in my Flutter project.我在 Flutter 项目中第一次使用 OjbectBox。 After I wrote the basic code to read and right user data, I'm getting this error:
在我编写了读取和正确用户数据的基本代码后,我收到了这个错误:
[!] CocoaPods could not find compatible versions for pod "ObjectBox":
In Podfile:
objectbox_flutter_libs (from `.symlinks/plugins/objectbox_flutter_libs/ios`) was resolved to 0.0.1, which depends on
ObjectBox (= 1.6.0)
objectbox_sync_flutter_libs (from `.symlinks/plugins/objectbox_sync_flutter_libs/ios`) was resolved to 0.0.1, which depends on
ObjectBox (= 1.6.0-sync)
I did what's recommended in this answer (first one) but I'm getting the same error when I try to update with pod install --repo-update
.我做了这个答案(第一个)中推荐的操作,但是当我尝试使用
pod install --repo-update
进行更新时,我遇到了同样的错误。
Any idea how to solve this?知道如何解决这个问题吗?
The way I solved this is by doing 3 things:我解决这个问题的方法是做三件事:
1- Deleting the sync library objectbox_sync_flutter_libs
entirely (I don't necessarily want to sync between devices. I just thought it would be cool to use it in the future but it's not a must). 1- 完全删除同步库
objectbox_sync_flutter_libs
(我不一定要在设备之间同步。我只是认为将来使用它会很酷,但这不是必须的)。 2- Changing the version of objectbox_flutter_libs
to 'any'. 2- 将
objectbox_flutter_libs
的版本更改为“any”。 3- Using a version for objectbox_generator
that's similar to ObjectBox version, which is 1.2.0 in my case. 3-使用版本
objectbox_generator
这类似于ObjectBox版本,这是在我的情况1.2.0。
There was no need for any flutter clean
or deleting podfile_lock
and re-getting or so, at least for my case.至少对于我的情况,不需要任何
flutter clean
或删除podfile_lock
并重新获取左右。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.