首页 > 解决方案 > Hello World 启动时出现黑屏

问题描述

我开始与 android studio 合作,并正在关注一本制作 hello world 应用程序的书。一旦我完成第一次声明项目并运行 gradle 它应该在顶部有一个带有 hello world 的标题,如下所示

在此处输入图像描述

但相反我得到

这个

在此处输入图像描述

我没有触及任何代码。但这里是 activity_quiz.xml

<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=".QuizActivity">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello World!"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

</android.support.constraint.ConstraintLayout>

有什么帮助吗?

标签: android

解决方案


推荐阅读