简体   繁体   English

包含path_provider时出错

[英]Error when include path_provider

I get an error when I'm trying to compile path_provider: 我在尝试编译path_provider时遇到错误:

/home/user/projects/flutterframework/TestApp/android/app/src/main/java/io/flutter/plugins/PluginRegistry.java:15: /home/user/projects/flutterframework/TestApp/android/app/src/main/java/io/flutter/plugins/PluginRegistry.java:15:

error: cannot find symbol 错误:找不到符号

path_provider = PathProviderPlugin.register(activity); path_provider = PathProviderPlugin.register(activity);

symbol: method register(FlutterActivity) 符号:方法寄存器(FlutterActivity)

location: class PathProviderPlugin location:类PathProviderPlugin

1 error 1错误

FAILURE: Build failed with an exception. FAILURE:构建因异常而失败。

What went wrong: 什么地方出了错:

Execution failed for task ':app:compileDebugJavaWithJavac'. 任务':app:compileDebugJavaWithJavac'的执行失败。

Compilation failed; 编译失败; see the compiler error output for details. 请参阅编译器错误输出以获取详细信

How can I fix it? 我该如何解决? Lubuntu 16 LTS x64 Lubuntu 16 LTS x64

It sounds like you have an old project template. 听起来你有一个旧的项目模板。 You shouldn't have a PluginRegistry.java. 你不应该有PluginRegistry.java。 Try flutter upgrade, recreate your project and copy the old project's dart files and assets over. 尝试flutter升级,重新创建项目并复制旧项目的dart文件和资产。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 flutter 中使用 path_provider package 时出错 - Error using path_provider package in flutter Flutter path_provider 在 Android 上出现错误,而在 iOS 上完美运行 - Flutter path_provider error on Android, while on iOS works perfectly Flutter path_provider 错误 - 无法解析项目:path_provider_linux - Flutter path_provider Error - Could not resolve project :path_provider_linux Flutter的'path_provider'依赖项中的未定义类 - Undefined class in 'path_provider' dependency for Flutter 无法在颤振中使用 path_provider - unable to use path_provider in flutter Gradle构建无法解析所有Path_provider依赖项 - Gradle build can not resolve all Path_provider dependencies Flutter:无法解析配置“:path_provider:classpath”的所有工件 - Flutter: Could not resolve all artifacts for configuration ':path_provider:classpath' FAILURE:配置项目“:path_provider”时出现问题 - FAILURE: A problem occurred configuring project ':path_provider' MissingPluginException(在通道 plugins.flutter.io/path_provider 上找不到方法 getApplicationDocumentsDirectory 的实现) - MissingPluginException(No implementation found for method getApplicationDocumentsDirectory on channel plugins.flutter.io/path_provider) Flutter:在通道插件上找不到方法 getApplicationDocumentsDirectory 的实现。flutter.io/path_provider - Flutter: No implementation found for method getApplicationDocumentsDirectory on channel plugins.flutter.io/path_provider
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM