未针对特定项目显示xml中的Android Studio建议

问题描述 投票:1回答:1

我使用的是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>
android android-studio
1个回答
0
投票

我前一段时间有这个问题,可以按照以下步骤解决;

  1. 关闭Android Studio。
  2. 删除C:\Users\{MyUsername}\.AndroidStudio3.5\system\caches\目录的内容。
  3. 重新启动Android Studio。

这应该会让您再次满意。希望对您有所帮助!

[[Note:我的回答是对prior answer I'd provided to a similar question的轻微修改。我已经尝试了您在问题中提到的所有其他建议,但上面提到的建议似乎都对我有用。

© www.soinside.com 2019 - 2024. All rights reserved.