Frezyx / talker

☎️ Advanced error handler and logger for dart and flutter apps
https://pub.dev/packages/talker
MIT License
446 stars 53 forks source link

Problem with share_plus #234

Open mustafa-fahimi opened 2 months ago

mustafa-fahimi commented 2 months ago

I get below error when trying to build the project: Windows 11 Flutter SDK: 3.19.6 talker_flutter version: 4.2.0

../../../AppData/Local/Pub/Cache/hosted/pub.flutter-io.cn/share_plus-9.0.0/lib/src/share_plus_windows.dart:9:8: Error: Error when reading '../../../AppData/Local/Pub/Cache/hosted/pub.flutter-io.cn/url_launcher_windows-3.1.1/lib/url_launcher_windows.dart': The system cannot find the path specified.

import 'package:url_launcher_windows/url_launcher_windows.dart';
       ^
../../../AppData/Local/Pub/Cache/hosted/pub.flutter-io.cn/share_plus-9.0.0/lib/src/share_plus_windows.dart:22:55: Error: Method not found: 'UrlLauncherWindows'.
      SharePlatform.instance = SharePlusWindowsPlugin(UrlLauncherWindows());
                                                      ^^^^^^^^^^^^^^^^^^
simplenotezy commented 1 month ago

I have the same errors. It's a bit odd that a logging package will pull in share_plus - and I would probably consider not doing this.

david-legend commented 1 month ago

if you're facing this error on codemagic - Here's a fix

Inside code magic, create a new env variable called JAVA_HOME and assign this value /Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home

note you can choose any version of java from this list

https://docs.codemagic.io/specs/versions-macos/

In this particular example it requires Java 17