app/layout/ファイルのに
activity_main.xml
omikuji.xml
とあるのですが、
omikuji.xmlにおいて
Image Viewを入れたのですが、画像が表示されません。
apiレベルを変更するとなぜか表示されます。(api23をapi26に変更すると表示される)
android6.0で使用したいので、困っています。
android studio3.0.1(最新版)を使用しています。
omikuji.xmlのソースファイル
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center_vertical|fill_horizontal" android:orientation="vertical"> <ImageView android:id="@+id/imageView7" android:layout_width="wrap_content" android:layout_height="wrap_content" android:contentDescription="@string/omikuji" app:srcCompat="@drawable/omikuji_challenge" /> </LinearLayout>
おまけにこんなエラーも出てきてしまいます
render problem
couldn't resolve resource @drawable /omikuji_challenge
tip try to refresh the layout.
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/03/25 12:56