android - New Android Studio projects don't show in "Android" structure view and XML files cannot initialize
问题描述
Platform: Mac OS 10.15.5, AS Version: Android Studio 4.0, build AI-193.6911.18.40.6514223 from JB Toolbox, Gradle version for projects: Gradle-6.1.1-all
I think this started after this one time where Gradle was running to build for like 15 minutes I thought "This is taking too long and restarted Android Studio (First stopping Gradle)."
I deleted the project since it proved unsuccessful (It was testing Intel Multi-OS Engine) and I went to start a new project.
For some reason all new projects now cannot display the "Android" Structure view (This also brings no run configurations so I can't build the app either) and XML files for the UI cannot be edited, first saying in Design view "Design Editor is unavailable until next Gradle sync" and then after syncing again, it just says "Failed to initialize editor." Restarting the IDE and computer did nothing, I thought this was a problem with Gradle so I deleted ~/.gradle, but still no results.
Mind you existing projects still work. I'm gonna try to reinstall Android Studio tomorrow, but it's not a great time since I'm also starting a group project with others using it tomorrow. What could be the cause of this?
(Can't post an image b/c of reputation)
解决方案
Ok yeah just reinstalled and now it works again. I knew that somehow the templates got corrupted or lost some files.
推荐阅读
- oracle - 带有字符串而不是整数的 while 循环
- java - axios.delete() 给出 403 错误...但是这在 POSTMAN 中有效,并且 axios.post 方法工作正常
- c++ - 转到 Qt5 上的静态库:架构 x86_64 的未定义符号:
- c# - C# WPF MVVM DataGrid MouseBinding for rows only
- c# - 如何设置本地离线局域网多人游戏?
- python-3.x - TKinter Splashscreen 不适用于 Python 3.6 基于 GUI 的应用程序
- json - Scala Json 使用 null 或 Option[Int] 反序列化
- reactjs - 使用 React 的内联 SVG(没有 JSX)
- vb.net - 如何将字符串添加到列表(索引)取决于 vb.net 中字符串的条件
- ios - 调用字符串扩展,包括从 Objective-C 用 Swift 编写的函数