Closed nathan380 closed 3 years ago
@nathan380 This was already answered here: https://github.com/heremaps/here-sdk-examples/issues/67
Basically, this was caused by an incompatible ffi version. We use FFI 0.1.3, and we will update to ffi 1.0 for one of the next releases. Until then other plugins that do not use 0.1.3 will not work together with the HERE SDK. This is a general problem with FFI.
With HERE SDK 4.6.5 this error was made more explicit.
waiting for update.
Hi @nicks258, we already released 4.6.5, 4.7.0 and 4.7.1, all of which contain the aforementioned improvement. If it does not work as expected, please reply here. Note that FFI 1.0 is not yet rolled out, as some customers still use FFI 0.1.3.
Hello, I develop on the flutter framework, when I install the here sdk and make the necessary settings, I run the example program the following error is displayed on the debugging console, would you have a solution to this problem, thank you!
plugins/here_sdk/lib/src/builtin_typesconversion.dart:82:23: Error: Method not found: 'Utf8.toUtf8'. final cValue = Utf8.toUtf8(value); ^^^^^^ plugins/here_sdk/lib/src/builtin_typesconversion.dart:84:3: Error: Method not found: 'free'. free(cValue); ^^^^ plugins/here_sdk/lib/src/builtin_typesconversion.dart:88:53: Error: Method not found: 'Utf8.fromUtf8'. String String_fromFfi(Pointer handle) => Utf8.fromUtf8(_String_get_value(handle));
^^^^^^^^
plugins/here_sdk/lib/src/builtin_types conversion.dart:120:30: Error: Method not found: 'Utf8.toUtf8'.
final cLanguageCode = Utf8.toUtf8(locale.languageCode);
^^^^^^
plugins/here_sdk/lib/src/builtin_typesconversion.dart:122:39: Error: Method not found: 'Utf8.toUtf8'.
locale.countryCode != null ? Utf8.toUtf8(locale.countryCode) : Pointer.fromAddress(0);
^^^^^^
plugins/here_sdk/lib/src/builtin_types conversion.dart:124:38: Error: Method not found: 'Utf8.toUtf8'.
locale.scriptCode != null ? Utf8.toUtf8(locale.scriptCode) : Pointer.fromAddress(0);
^^^^^^
plugins/here_sdk/lib/src/builtin_typesconversion.dart:125:29: Error: Method not found: 'Utf8.toUtf8'.
final cLanguageTag = Utf8.toUtf8(locale.toLanguageTag());
^^^^^^
plugins/here_sdk/lib/src/builtin_typesconversion.dart:129:3: Error: Method not found: 'free'.
free(cLanguageCode);
^^^^
plugins/here_sdk/lib/src/builtin_typesconversion.dart:130:34: Error: Method not found: 'free'.
if (cCountryCode.address != 0) free(cCountryCode);
^^^^
plugins/here_sdk/lib/src/builtin_typesconversion.dart:131:33: Error: Method not found: 'free'.
if (cScriptCode.address != 0) free(cScriptCode);
^^^^
lugins/here_sdk/lib/src/builtin_typesconversion.dart:132:3: Error: Method not found: 'free'.
free(cLanguageTag);
^^^^
plugins/here_sdk/lib/src/builtin_typesconversion.dart:141:30: Error: Method not found: 'Utf8.fromUtf8'.
return Locale.parse(Utf8.fromUtf8(languageTagCstring));
^^^^^^^^
plugins/here_sdk/lib/src/builtin_typesconversion.dart:149:59: Error: Method not found: 'Utf8.fromUtf8'.
languageCode: languageCodeCstring.address != 0 ? Utf8.fromUtf8(languageCodeCstring) : null,
^^^^^^^^
plugins/here_sdk/lib/src/builtin_typesconversion.dart:150:57: Error: Method not found: 'Utf8.fromUtf8'.
countryCode: countryCodeCstring.address != 0 ? Utf8.fromUtf8(countryCodeCstring) : null,
^^^^^^^^
plugins/here_sdk/lib/src/builtin_types__conversion.dart:151:55: Error: Method not found: 'Utf8.fromUtf8'.
scriptCode: scriptCodeCstring.address != 0 ? Utf8.fromUtf8(scriptCodeCstring) : null
^^^^^^^^
FAILURE: Build failed with an exception.
Where: Script 'C:\Users\Nathan\Documents\Dev\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 991
What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 30s Exception: Gradle task assembleDebug failed with exit code 1 Exited (sigterm)