Java IntelliJ中的Android渲染问题

Java IntelliJ中的Android渲染问题,java,android,xml,api,intellij-idea,Java,Android,Xml,Api,Intellij Idea,我刚刚将我的代码从Android Studio切换到IntelliJ,由于某种原因,我在让它重新工作时遇到了一些困难。 我见过一些类似的问题,它们都指向设置了错误的API级别。 我的API设置为23级,设备设置为Nexus6 我尝试过使缓存失效,重新启动缓存,并检查是否设置了正确的API级别,但没有效果 你知道我遗漏了什么吗 当我尝试运行我的应用程序时,会出现以下错误: Information:Some files were changed during the build. Additiona

我刚刚将我的代码从Android Studio切换到IntelliJ,由于某种原因,我在让它重新工作时遇到了一些困难。 我见过一些类似的问题,它们都指向设置了错误的API级别。 我的API设置为23级,设备设置为Nexus6

我尝试过使缓存失效,重新启动缓存,并检查是否设置了正确的API级别,但没有效果

你知道我遗漏了什么吗

当我尝试运行我的应用程序时,会出现以下错误:

Information:Some files were changed during the build. Additional compilation may be required.
Information:09/01/2016, 18:18 - Compilation completed with 10 errors and 0 warnings in 29s 485ms
Error:android-apt-compiler: [main] " where item tag is expected
/Users/richardcurteis/Desktop/AndroidTraining/Connect3/app/src/main/res/values-v21/styles.xml
Error:(1, -1) android-apt-compiler: [main] /Users/richardcurteis/Desktop/AndroidTraining/Connect3/app/src/main/res/values-v21/styles.xml:1: error: Found text ">
/Users/richardcurteis/Desktop/AndroidTraining/Connect3/app/src/main/res/values/styles.xml
Error:(4, -1) android-apt-compiler: [main] /Users/richardcurteis/Desktop/AndroidTraining/Connect3/app/src/main/res/values/styles.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
Error:(8, -1) android-apt-compiler: [main] /Users/richardcurteis/Desktop/AndroidTraining/Connect3/app/src/main/res/values/styles.xml:8: error: Error: No resource found that matches the given name: attr 'colorAccent'.
Error:(6, -1) android-apt-compiler: [main] /Users/richardcurteis/Desktop/AndroidTraining/Connect3/app/src/main/res/values/styles.xml:6: error: Error: No resource found that matches the given name: attr 'colorPrimary'.
Error:(7, -1) android-apt-compiler: [main] /Users/richardcurteis/Desktop/AndroidTraining/Connect3/app/src/main/res/values/styles.xml:7: error: Error: No resource found that matches the given name: attr 'colorPrimaryDark'.
Error:(12, -1) android-apt-compiler: [main] /Users/richardcurteis/Desktop/AndroidTraining/Connect3/app/src/main/res/values/styles.xml:12: error: Error: No resource found that matches the given name: attr 'windowActionBar'.
Error:(13, -1) android-apt-compiler: [main] /Users/richardcurteis/Desktop/AndroidTraining/Connect3/app/src/main/res/values/styles.xml:13: error: Error: No resource found that matches the given name: attr 'windowNoTitle'.
Error:(16, -1) android-apt-compiler: [main] /Users/richardcurteis/Desktop/AndroidTraining/Connect3/app/src/main/res/values/styles.xml:16: error: Error retrieving parent for item: No resource found that matches the given name 'ThemeOverlay.AppCompat.Dark.ActionBar'.
Error:(18, -1) android-apt-compiler: [main] /Users/richardcurteis/Desktop/AndroidTraining/Connect3/app/src/main/res/values/styles.xml:18: error: Error retrieving parent for item: No resource found that matches the given name 'ThemeOverlay.AppCompat.Light'.
同时在“设计渲染”窗口中:

Rendering Problems
NOTE: One or two more layouts are missing the layout_width or layout_height attributes.
在大多数布局中,这些都是必需的

XML:



之外有一个奇怪的
嵌套的ScrollingEnabled
属性无效XML@Floern,我删除了嵌套的ScrollingEnabled,但问题仍然存在
<?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="com.example.richardcurteis.connect3.MainActivity"
    tools:showIn="@layout/activity_main"
    android:background="#070000">

    <TableLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_alignParentRight="false"
        android:layout_alignParentEnd="false"
        android:layout_alignParentStart="false"
        android:layout_centerInParent="true"
        android:id="@+id/tableLayout"
        android:background="#000000">

        <TableRow
            android:layout_width="match_parent"
            android:layout_height="match_parent"></TableRow>

        <TableRow
            android:layout_width="match_parent"
            android:layout_height="match_parent"></TableRow>

        <TableRow
            android:layout_width="match_parent"
            android:layout_height="match_parent"></TableRow>

        <TableRow
            android:layout_width="match_parent"
            android:layout_height="match_parent"></TableRow>

        <TableRow
            android:layout_width="match_parent"
            android:layout_height="match_parent"></TableRow>

        <TableRow
            android:layout_width="match_parent"
            android:layout_height="match_parent"></TableRow>

        <TableRow
            android:layout_width="match_parent"
            android:layout_height="match_parent"></TableRow>

        <TableRow
            android:layout_width="match_parent"
            android:layout_height="match_parent"></TableRow>

        <TableRow
            android:layout_width="match_parent"
            android:layout_height="match_parent"></TableRow>

        <TableRow
            android:layout_width="match_parent"
            android:layout_height="match_parent"></TableRow>

        <TableRow
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <Button
                android:layout_width="100dp"
                android:layout_height="100dp"
                android:id="@+id/gridButton1"
                android:layout_column="4"
                android:onClick="receiveClick"
                android:tag="0"/>

            <Button
                android:layout_width="100dp"
                android:layout_height="100dp"
                android:id="@+id/gridButton2"
                android:layout_column="12"
                android:onClick="receiveClick"
                android:tag="1" />

            <Button
                android:layout_width="100dp"
                android:layout_height="100dp"
                android:id="@+id/gridButton3"
                android:layout_column="19"
                android:onClick="receiveClick"
                android:tag="2" />
        </TableRow>

        <TableRow
            android:layout_width="match_parent"
            android:layout_height="match_parent"></TableRow>

        <TableRow
            android:layout_width="match_parent"
            android:layout_height="match_parent"></TableRow>

        <TableRow
            android:layout_width="match_parent"
            android:layout_height="match_parent"></TableRow>

        <TableRow
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <Button
                android:layout_width="100dp"
                android:layout_height="100dp"
                android:id="@+id/gridButton4"
                android:layout_column="4"
                android:onClick="receiveClick"
                android:tag="3"/>

            <Button
                android:layout_width="100dp"
                android:layout_height="100dp"
                android:id="@+id/gridButton5"
                android:layout_column="12"
                android:onClick="receiveClick"
                android:tag="4"/>

            <Button
                android:layout_width="100dp"
                android:layout_height="100dp"
                android:id="@+id/gridButton6"
                android:layout_column="19"
                android:onClick="receiveClick"
                android:tag="5"/>
        </TableRow>

        <TableRow
            android:layout_width="match_parent"
            android:layout_height="match_parent"></TableRow>

        <TableRow
            android:layout_width="match_parent"
            android:layout_height="match_parent"></TableRow>

        <TableRow
            android:layout_width="match_parent"
            android:layout_height="match_parent"></TableRow>

        <TableRow
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <Button
                android:layout_width="100dp"
                android:layout_height="100dp"
                android:id="@+id/gridButton7"
                android:layout_column="4"
                android:onClick="receiveClick"
                android:tag="6"/>

            <Button
                android:layout_width="100dp"
                android:layout_height="100dp"
                android:id="@+id/gridButton8"
                android:layout_column="12"
                android:onClick="receiveClick"
                android:tag="7"/>

            <Button
                android:layout_width="100dp"
                android:layout_height="100dp"
                android:id="@+id/gridButton9"
                android:layout_column="19"
                android:onClick="receiveClick"
                android:tag="8" />
        </TableRow>
    </TableLayout>

    <Button

        android:layout_width="200dp"
        android:layout_height="120dp"
        android:text="New Game"
        android:id="@+id/newGameButton"
        android:layout_below="@+id/tableLayout"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="61dp" />
</RelativeLayout>