Flutter插件开发未解决参考:io [英] Flutter plugin development Unresolved reference: io
本文介绍了Flutter插件开发未解决参考:io的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我第一次尝试创建 flutter 插件,我从 android studio 创建了 flutter 插件项目并且它运行良好,当我尝试为 android 添加平台特定的代码时,我遇到了一些问题,在同一个项目平台特定的代码编辑中几乎死了(没有掉毛).我在android studio中导入了MyPluginProject/android,也有一些问题,
Its my first attempt to create a flutter plugin, I created flutter plugin project from android studio and its running fine, when I tried to add platform specific code for android I stuck in some issues, in the same project platform specific code editing is almost dead (no linting). I imported MyPluginProject/android in android studio and there are also some issues,
Unresolved reference: io
这是flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.7.8+hotfix.2, on Linux, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
[✓] Android Studio (version 3.4)
[✓] Connected device (1 available)
• No issues found!
推荐答案
按照 这个问题在github上.
Solved the problem by following these steps from this issue on github.
- 删除项目中的.idea文件夹(不知道是否需要但是只是为了确定)
- 在Android Studio中点击
Open an existing Android studio project
并选择文件夹your_plugin/example/android
(打开your_plugin/example/android很重要
首先是your_plugin
).
- Delete the .idea folder in the project (do not know if is needed but just to be sure)
- In Android Studio click on
Open an existing Android studio project
and select the folderyour_plugin/example/android
(It's important to openyour_plugin/example/android
first and thenyour_plugin
).
这篇关于Flutter插件开发未解决参考:io的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文