我是Android工作室的新手,但是当我将ImageView
拖到我的屏幕上时,我从drawable中选择了我的图片,但后来我收到了一个Render错误说:
The following classes could not be substantiated:
- android.support.v7.widget.AppCombatImageView
知道问题是什么吗? ImageView
在XML中看起来很好:
<ImageView
android:id="@+id/shopCentre"
android:layout_width="120dp"
android:layout_height="64dp"
app:srcCompat="@drawable/shopping-centre"
app:layout_constraintTop_toTopOf="parent"
android:layout_marginTop="30dp"
android:layout_marginRight="8dp"
app:layout_constraintRight_toRightOf="parent"
android:layout_marginLeft="8dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintHorizontal_bias="0.498" />
build.gradle(项目:应用)
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}