ImageView displaying in layout but not on actual device

I had the same issue, it is only showing in Design tab for Android Studio 2.2.

What I did to make it work is to change the automatic key assigned (populated via Drag/Drop ImageView) from app:srcCompat="https://stackoverflow.com/questions/18251187/@drawable/logo" to android:src="https://stackoverflow.com/questions/18251187/@drawable/logo" in Text tab to make it appear on both the emulator and the device e.g

<ImageView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="https://stackoverflow.com/questions/18251187/@drawable/logo"
    android:layout_alignParentTop="true"
    android:layout_centerHorizontal="true"
    android:layout_marginTop="75dp"
    android:id="@+id/logoImageView"
    android:scaleType="fitXY"
    android:scaleX="1.5"
    android:scaleY="1.5" />

Leave a Comment