【问题标题】:My Flutter Android folder shows an error and I don't understand where the error is我的 Flutter Android 文件夹显示错误,我不明白错误在哪里
【发布时间】:2020-07-01 20:04:55
【问题描述】:

有一个关于 Java 的弹出窗口告诉我更新它,但我不小心点击了它。我正在做地理定位应用程序,之后,我的 Android 文件夹出现错误,如下所示。

[C:\myapp\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java:19: error: cannot access OnCompletionListener
    flutterEngine.getPlugins().add(new com.baseflow.geolocator.GeolocatorPlugin());
                              ^
  class file for com.baseflow.geolocator.OnCompletionListener not found
1 error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* 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 1m 21s
Exception: Gradle task assembleDebug failed with exit code 1][1]

【问题讨论】:

  • 尝试升级你的插件,尤其是geolocator 一个。似乎错误在这个插件中
  • 我刚才已经升级了我的插件,但还是出现了同样的错误。我不知道实际错误来自哪里:(
  • 尝试执行flutter clean并重新运行应用程序
  • 成功了!!非常感谢先生!!
  • 我将其添加为答案,请将其标记为已接受。

标签: java android flutter geolocation redhat


【解决方案1】:

执行这个命令:

flutter clean

然后重新运行应用程序。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-06-10
    • 2016-10-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-06-22
    相关资源
    最近更新 更多