Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/204.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 当我拖放一个';ImageView';_Android_Android Studio - Fatal编程技术网

Android 当我拖放一个';ImageView';

Android 当我拖放一个';ImageView';,android,android-studio,Android,Android Studio,我对Android studio非常陌生,但当我将ImageView拖到屏幕上时,我从drawable中选择了我的图片,但随后出现了一个渲染错误,如下所示: The following classes could not be substantiated: - android.support.v7.widget.AppCombatImageView 知道问题出在哪里吗?ImageView在XML中看起来很好: <ImageView android:id="@+id/sho

我对Android studio非常陌生,但当我将
ImageView
拖到屏幕上时,我从drawable中选择了我的图片,但随后出现了一个渲染错误,如下所示:

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文件使用android:src=“@drawable/shopping_center”而不是app:srccompate,谢谢@jaydeppatel
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
}