本文介绍了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中,点击
打开现有的Android Studio项目
,然后选择文件夹your_plugin/example/android
(打开your_plugin/example/android很重要
,然后your_plugin
).
- Delete the .idea folder in the project (do not know if is needed butjust 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!