我刚刚安装的Android工作室3预览金丝雀6.布局来看我不能,因为下面的错误activity_main.xml中获取XML布局的预览:Android的布局:无法看到
- 渲染问题
- 无法实例化一个或多个类
当我安装金丝雀5.这也正好我认为升级到加纳利6将解决这个问题,但事实并非如此。请帮我修复它,以便我可以开始构建我的应用程序。
这里是我的XML:
<?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.companyname.zooapp.MainActivity">
<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>
在此处发布您的XML。 –
尝试更改预览部分中的Api级别。 – SripadRaj
添加了我的xml。我已经改变了API级别。 –