android studio

时间:2016-03-10 19:06:12

标签: android

我刚开始一个新项目,一旦gradle构建完成,由于渲染问题,“content_main”活动无法加载。 这是警报:

The following classes could not be found:
- android.support.design.widget.FloatingActionButton

这是我的content_main代码:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="sparta.madness.loooooooooooooooool.MainActivity"
tools:showIn="@layout/activity_main">

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:hint="Hello World!" />
</RelativeLayout>

1 个答案:

答案 0 :(得分:0)

您需要添加

compile 'com.android.support:design:23.1.0'

到您的gradle