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

builtin_types_conversion.dart "Method not found errors" #67

Closed
emilyjonesr opened this issue Mar 8, 2021 · 15 comments
Closed

builtin_types_conversion.dart "Method not found errors" #67

emilyjonesr opened this issue Mar 8, 2021 · 15 comments

Comments

@emilyjonesr
Copy link

Hello!

I have been following the Get Started for HERE SDK for Flutter following the steps here: https://developer.here.com/documentation/flutter-sdk-explore/4.6.3.0/dev_guide/topics/quick-start.html#create-a-new-flutter-project-and-show-a-here-map

I have followed all of the steps, very carefully, multiple times, and while running on iOS simulator, after the Xcode build is done, I get the following errors from the builtin_types_conversion.dart file.
Screen Shot 2021-03-08 at 2 51 29 PM

There are more but they all say the same "Method not found".

At the top of the builtin_types_conversion.dart file, it doesn't seem to recognize "intl" in the line: "import 'package:intl/locale.dart';"

I haven't touched the builtin_types_conversion.dart file and my pubspec.yaml file inside the here_sdk folder looks like this:
Screen Shot 2021-03-08 at 3 04 26 PM

The intl line under dependencies was originally just "intl:" when the problem started. I tried changing it to "intl: ^0.17.0" both with and without quotations and then running pub get, but that didn't work.

If you have any ideas on how to solve this or have any more insight into the problem, please let me know! Thanks!

@revrkk
Copy link

revrkk commented Mar 9, 2021

Yes, I'm also getting the same issue from yesterday.

@revrkk
Copy link

revrkk commented Mar 9, 2021

I tried the same in the previous flutter version 1.22.x and it worked.

@emilyjonesr
Copy link
Author

Hi! Thanks for your help!
I tried changing to flutter 1.22.5, dart 2.10.4, Xcode 12.4, and android studio 4.1.1 as specified in the tutorial and restarting android studio and running flutter clean and flutter get pub a ton of times, but none of that has worked. Are there any extra steps you took to resolve the issue? Did you use these same versions? This is my pubspec.yaml now
Screen Shot 2021-03-09 at 10 40 15 PM

Thanks! @revrkk

@HERE-SDK-Support-Team
Copy link
Contributor

HERE-SDK-Support-Team commented Mar 10, 2021

@emilyjonesr Can you run flutter doctor -v from your terminal and paste the results here? Or at least, dart --version, since it sounds like you are using not the Dart version bundled with Flutter. The error logs point to the ffi package and there was a recent change related to utf8: https://pub.dev/packages/ffi/changelog

The minimum supported Flutter version is still 1.20.0, so actually, it should not be needed to use a newer version - although it should also work. Internally, we tested that the examples build fine with Flutter 1.20 and Dart 2.9.2 - as well as Flutter 1.22 and Dart 2.10.4.

We always recommend to use the Dart version that is bundled with Flutter.

@emilyjonesr
Copy link
Author

@datasun Hi, yes here it is
Screen Shot 2021-03-10 at 5 49 03 PM

Thank you for your help.

@revrkk
Copy link

revrkk commented Mar 11, 2021

MicrosoftTeams-image

Here is mine. I'm using Flutter 1.22.2 and Dart 2.10.2.
I can run the example app with this

@HERE-SDK-Support-Team
Copy link
Contributor

HERE-SDK-Support-Team commented Mar 11, 2021

Thanks! @revrkk - The Dart version you use (2.10.4) is not matching your Flutter version (1.22.5), could you try to downgrade or upgrade?

PS: We also added version pinning of the "ffi" dependency inside the HERE SDK's Flutter plugin. Hopefully, this can prevent such issues in the future. This should be available with the next release.

@alexl246
Copy link

@datasun Am having exact same issue - same 'method not found' etc.

Have followed your suggestions and here is my flutter/ dart versions etc - any help is greatly appreciated

Screenshot 2021-03-19 at 00 54 51

@HERE-SDK-Support-Team
Copy link
Contributor

HERE-SDK-Support-Team commented Mar 19, 2021

@alexl246 You are using the preview / beta Flutter channel. Officially, we only support the stable channel, and also, only the minimum required version as listed in the user guide. However, with HERE SDK v4.6.5.0 also newer versions may work, as we made a fix to the ffi dependency. For now, either wait for the next HERE SDK release, or downgrade to the minimum supported Flutter version.

@sajunt4
Copy link

sajunt4 commented Mar 23, 2021

Hi,
I've been given with HERE SDK v4.6.5.0 and the issue still pressent. It cames, in my case, from a dependency version missmatch.
In version v4.6.5.0 the SDK is forcing FFI version 0.1.3, that conflicts with many other packages that has already been updated to FFI 1.0.0.

For example, by using the open_file pluggin I've get this report while doing pub get:

Because every version of here_sdk from path depends on ffi ^0.1.3 and open_file 3.1.0 depends on ffi ^1.0.0, here_sdk from path is incompatible with open_file 3.1.0.

So I guess the only way to fix this is updating builtin_types__conversion.dart file to match the new ffi 1.0.0 standard.

(I'm using Flutter 2.0.2 stable channel.)

@HERE-SDK-Support-Team
Copy link
Contributor

HERE-SDK-Support-Team commented Mar 23, 2021

@sajunt4 Thanks for reporting. We will look into this. Meanwhile, what exactly you mean by the dependency version mismatch? Can you maybe share the results you get from flutter doctor -v?

@sajunt4
Copy link

sajunt4 commented Mar 24, 2021

@datasun
I mean that open_file, for example, requires ffi version 1.0.0, and Here SDK requires version 0.1.3. That makes both pluggins incompatible, so you cannot use Here SDK with other pluggins that have already been updated to ffi 1.0.0.

My flutter doctor:
`[√] Flutter (Channel stable, 2.0.2, on Microsoft Windows [Version 10.0.21337.1010], locale en-US)
• Flutter version 2.0.2 at D:\Programs\Flutter
• Framework revision 8962f6dc68 (13 days ago), 2021-03-11 13:22:20 -0800
• Engine revision 5d8bf811b3
• Dart version 2.12.1

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at C:\Users\sajun\AppData\Local\Android\sdk
• Platform android-30, build-tools 30.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.

[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 4.1.0)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] VS Code (version 1.54.3)
• VS Code at C:\Users\sajun\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.20.0

[√] Connected device (3 available)
• ONEPLUS A6000 (mobile) • 2634f08 • android-arm64 • Android 10 (API 29)
• Chrome (web) • chrome • web-javascript • Google Chrome 89.0.4389.90
• Edge (web) • edge • web-javascript • Microsoft Edge 89.0.774.57

• No issues found!`

@HERE-SDK-Support-Team
Copy link
Contributor

HERE-SDK-Support-Team commented Mar 25, 2021

@sajunt4 Ok, thanks!

Yes, basically, the HERE SDK uses FFI 0.1.3 (as it's indicated in the pubspec.yaml you can see in the plugin). Unfortunately, that means that the SDK is not compatible with plugins that already use FFI 1.0

We plan to upgrade to FFI 1.0 with one of the next releases.

If there is a way to make a plugin compatible with different FFI versions, we could think about a solution, but apparently it seems that this is not possible - so, this problem is not only valid for the HERE SDK plugin.

@sysquo-aditya
Copy link

Hey @datasun ,

With Firebase having changed so much, it has become irreplaceable for our app that is already in Production. A new feature requires a basic Map to be shown to the user and we looked at Here SDK for that.

It seems a lot of people are encountering this issue as well. Do you think it would be possible in near future to upgrade to using ffi 1.0.0?
I am currently using Here SDK 4.7.5 and the app wouldn't build.

@HERE-SDK-Support-Team
Copy link
Contributor

@sysquo-aditya Yes, we can confirm that FFI 1 support will come with the HERE SDK 4.8 release, which is supposed to be released in about four weeks.

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

6 participants