在 Android Studio 中找不到 Open for Editing [英] Can't find Open for Editing in Android Studio
本文介绍了在 Android Studio 中找不到 Open for Editing的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是 Flutter 的新手.我想将 flutter 的 (android) 模块打开到另一个窗口.但是在 java 文件或任何其他 android 文件中没有可见的选项.
I'm new to flutter. I want to open (android)module of flutter to another window. But there's no option visible in java file or any other android file.
这是我的颤振医生:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v1.7.8+hotfix.4, on Mac OS X 10.14.5 18F132, locale en-IN)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
[!] iOS tools - develop for iOS devices
✗ libimobiledevice and ideviceinstaller are not installed. To install with Brew, run:
brew update
brew install --HEAD usbmuxd
brew link usbmuxd
brew install --HEAD libimobiledevice
brew install ideviceinstaller
[✓] Android Studio (version 3.1)
[!] VS Code (version 1.42.1)
✗ Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (1 available)
! Doctor found issues in 2 categories.
推荐答案
该问题是由于缺少 .iml
项目文件造成的.这些文件会自动添加到 .gitignore
文件中,但它们不应该.修复它:
The problem is caused by missing .iml
project files. These files are added automatically to the .gitignore
file but they should not. To fix it:
- 删除
.idea
文件夹. - 创建一个新的同名临时 Flutter 项目.
- 将这两个丢失的文件从项目复制到现有项目:
[project_name].iml
android/[project_name]_android.iml
- 打开 Android Studio,问题应该就没有了.
为了避免将来发生这种情况,请确保 .iml 文件没有被排除在 gitignore 中.有一个关于此主题的 Github 问题.
To avoid it in the future, make sure .iml files are not excluded in the gitignore. There is a Github issue on this topic.
这篇关于在 Android Studio 中找不到 Open for Editing的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文