android - xml 中的 Android Studio 建议未针对特定项目显示
问题描述
我正在使用 android studio 3.5.1 版,对于所有其他项目,它工作正常,但对于特定项目,xml 建议没有显示。我已经尝试过使缓存无效,删除.idea
文件夹,但结果保持不变。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".xyz">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
解决方案
不久前我遇到了这个问题,并且能够按照以下步骤解决它;
- 关闭安卓工作室。
- 删除
C:\Users\{MyUsername}\.AndroidStudio3.5\system\caches\
目录的内容。 - 重新启动 Android Studio。
这应该让事情再次为你工作。我希望这会有所帮助!
注意:我在这里的回答是对我提供给类似问题的先前回答的轻微修改。我已经尝试了您在问题中提到的所有其他建议,但没有一个我在上面包含的建议似乎对我有用。
推荐阅读
- string - Jenkins - 如何将 ${WORKSPACE} 与字符串文字连接起来?
- django - 每次在 Django 中触摸对象时,将递增整数添加到查询集
- asp.net-core - .NET Core Razor Pages 数据绑定与表单提交的部分视图
- ruby - Windows 10 上的 Ruby sqlite3 gem 安装问题
- android - 构建发布和调试 apk 时未找到 Firebase Auth AndroidX 依赖项
- c++ - 热路径的分析和 std::vector 部分?
- postgresql - pgAdmin4:如何让我的所有 Heroku Postgres 数据库显示在 pgAdmin 中?
- active-directory - 更改 Active Directory 2003 中的登录名
- smarty - smarty3模板引擎中如何使用include
- java - IBM Cloud 启动包无法识别 java8