我都有以下错误:应用程序崩溃,当我尝试删除标题栏
Missing classes One or more layouts are missing the layout_width or layout_height attributs
和
element activity is not allowed here
这里是我的布局
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
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="com.example.niklas.uebungsrechner.MainActivity"
tools:layout_editor_absoluteY="81dp"
tools:layout_editor_absoluteX="0dp">
<activity android:name=".MainActivity"
android:theme="@android:style/Theme.NoTitleBar">
</activity>
您不能在布局中进行活动。活动标签应该只在清单中使用 –