本文介绍了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.

  1. 删除项目中的.idea文件夹(不知道是否需要,但只是为了确定)
  2. 在Android Studio中,点击打开现有的Android Studio项目,然后选择文件夹 your_plugin/example/android (打开 your_plugin/example/android很重要,然后 your_plugin ).
  1. Delete the .idea folder in the project (do not know if is needed butjust to be sure)
  2. In Android Studio click on Open an existing Android studio project and select the folder your_plugin/example/android (It's important to open your_plugin/example/android first and then your_plugin).

这篇关于Flutter插件开发未解决的参考:io的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 23:22