我正在尝试使用image_picker包从图库中选择图像,无论如何,此错误都会持续存在。 已经尝试过的解决方案:
Dim orientation As Orientation
Select Case direction
Case Directions.Up
orientation = Orientation.North
Case Directions.Right
orientation = Orientation.East
Case Directions.Down
orientation = Orientation.South
Case Directions.Left
orientation = Orientation.West
End Select
我用来获取图像的功能:
Unhandled Exception: MissingPluginException(No implementation found for method pickImage on channel plugins.flutter.io/image_picker)
E/flutter ( 2928): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:157:7)
E/flutter ( 2928): <asynchronous suspension>
E/flutter ( 2928): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:332:12)
例如,某些软件包是否发生冲突而禁用其他软件包?我安装的软件包:
void getPicture() async{
final picker = ImagePicker();
final pickedFile = await picker.getImage(source: ImageSource.gallery);
_image = File(pickedFile.path);
_picLink = await dbOnlineInstance.uploadProfilePic(_image, authInstance.firebaseAuthInstance.currentUser.email);
notifyListeners();
}
还是权限问题?尽管此程序包不需要权限,并且错误本身与权限无关。
答案 0 :(得分:0)
是的,正如我所料。经过大量测试,结果发现软件包 flutter_facebook_auth (未配置)与 image_picker 发生冲突。我不知道该软件包与禁用image_picker插件有什么关系,实际上使它像未安装一样丢失了。
如果您打算使用flutter_facebook_auth,请确保您不只是将其放入pubspec.yaml中,并配置您的AndroidManifest和Strings.xml ,即使您不打算使用打包一次,只是为了一次安装所有软件包而将其放入。
答案 1 :(得分:0)
我遇到了与您类似的问题,但我的问题介于 flutter_facebook_auth 和 sqflite 之间。
我收到(在执行“flutter run”之后): 未处理的异常:MissingPluginException(在通道 com.tekartik.sqflite.SqflitePlugin 上找不到方法 getDatabasesPath 的实现)
解决方案是在阅读@Ismaeil Ghouneim回复后,谢谢!
我在此处按照本教程进行了所有配置:https://facebook.meedu.app/#/ 一切都恢复正常了!