【问题标题】:android studio 3.0 no suggestions in XML with custom elementsandroid studio 3.0 没有自定义元素的 XML 建议
【发布时间】:2017-11-03 10:12:36
【问题描述】:

我已将 Android Studio 更新到 3.0,现在我没有关于自定义元素的 XML 建议。有时它会起作用,但大多数情况下不会。

我做了“文件>无效缓存/重新启动”,但同样 删除了系统中所有的 Android Studio 文件夹和临时文件("*.idea", "*.iml", ".gradle", "build"... logs..),但还是一样。 研究了配置,但没有发现任何与此相关的。

在以前的 Android Studio (2.3.3) 上再次尝试,成功了。

XML 文件示例:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/containerView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/bg"
    tools:context=".view.activity.WelcomePageActivity">

    <com.innovattic.font.FontTextView
        android:id="@+id/tvTitle"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_centerInParent="true"
        android:layout_marginTop="1dp"/>

</RelativeLayout>

有人知道在哪里或如何配置它以突出显示吗?还是3.0版本的bug?

在 Mac OS X 上

【问题讨论】:

    标签: android-layout android-studio android-xml


    【解决方案1】:

    1)从项目中删除.idea folder 和所有.iml files
    2)重启Android Studio
    3) 最后重建 gradle。

    【讨论】:

    • 试过了。 “删除了系统中所有的Android Studio文件夹和临时文件”就是这个意思。
    猜你喜欢
    • 2021-12-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-12-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-01-14
    相关资源
    最近更新 更多