我使用的是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\
目录的内容。这应该会让您再次满意。希望对您有所帮助!
[[Note:我的回答是对prior answer I'd provided to a similar question的轻微修改。我已经尝试了您在问题中提到的所有其他建议,但上面提到的建议似乎都对我有用。