実際に遭遇した例

個人的な調査

カテゴリー: 警告  閲覧数:618 配信日:2018-05-08 13:22


警告表示


Image Without `contentDescription`

修正前


▼layout/activity_main.xml
<ImageView
   android:id="@+id/imageView3"
   android:layout_width="200dp"
   android:layout_height="200dp"
   android:scaleType="matrix"
   app:layout_constraintBottom_toBottomOf="parent"
   app:layout_constraintStart_toStartOf="parent"
   app:srcCompat="@drawable/lion" />


修正後(ハードコーディング)


android:contentDescription="ライオン"を追加
▼layout/activity_main.xm
<ImageView
   android:id="@+id/imageView3"
   android:layout_width="200dp"
   android:layout_height="200dp"
   android:contentDescription="ライオン"
   android:scaleType="matrix"
   app:layout_constraintBottom_toBottomOf="parent"
   app:layout_constraintStart_toStartOf="parent"
   app:srcCompat="@drawable/lion" />


修正後(推奨)


android:contentDescription="@string/img_txt_lion"を追加
▼layout/activity_main.xm
<ImageView
   android:id="@+id/imageView3"
   android:layout_width="200dp"
   android:layout_height="200dp"
   android:contentDescription="ライオン"
   android:scaleType="matrix"
   app:layout_constraintBottom_toBottomOf="parent"
   app:layout_constraintStart_toStartOf="parent"
   app:srcCompat="@drawable/lion" />


▼values/strings.xml
<resources>
   <string name="app_name">First2 20180504</string>
   <string name="first">はじめて</string>
   <string name="tap_here">ここをタップ!</string>
   <string name="img_txt_lion">ライオン</string>
</resources>


週間人気ページランキング / 8-10 → 8-16
順位 ページタイトル抜粋 アクセス数
1 Android FAQ 14
2 「SQLite dumpデータ」を出力しても無意味 2
2 この行に複数マーカーがあります | エラー(エラー) 2
2 public 型 ★★ はそれ独自のファイル内に定義されなければなりません | エラー 2
2 Your project contains error(s),please fix them before running your application | エラー(エラー) 2
3 please select Android SDK | Android Studio(IDE) 1
3 「Android Studio 3.0.1」でプロジェクトを選択するためには? 最初に「現在開いているプロジェクト」を閉じる必要がある | Android Studio(IDE) 1
3 実際に遭遇した例 1
3 PCのエミュレータ上で動かしているAndroidアプリで、ローカルファイルを保存したとき、何処に保存されているの? 1
3 This text field does not specify an inputType or a hint | 警告(エラー) 1
3 「SQLite Database 」へ保存したデータを確認したい | SQLite 1
3 Gradle(環境構築) カテゴリー 1
3 E/Trace(★★): error opening trace file: No such file or directory | エラー(エラー) 1
3 キーバインドの競合が発生しました。 通常のアクセラレーター操作を妨げる可能性があります。 | エラー(エラー) 1
3 Unexpected error while launching logcat | エラー(エラー) 1
3 メソッド onCreate(Bundle) は型 Object で未定義です | エラー 1
3 values-ja/strings.xmlに記載した内容が反映されない | 多言語化(環境構築) 1
3 ○○は解決できないか、フィールドではありません | エラー(エラー) 1
3 ユーザコメント一覧ページ 1
3 既存JAVAプロジェクトをKotlinへ変換 | Kotlin(環境構築) 1
2026/8/17 5:05 更新
指定期間人気ページランキング / 2020-5-27 → 2026-8-16
順位 ページタイトル抜粋 アクセス数
1 インポートされた ★★ は見つかりません | エラー 23668
2 public 型 ★★ はそれ独自のファイル内に定義されなければなりません | エラー 10463
3 この行に複数マーカーがあります | エラー(エラー) 7400
4 ○○は解決できないか、フィールドではありません | エラー(エラー) 7389
5 いくつかのプロジェクトは、ワークスペース・ディレクトリーにすでに存在するため、インポートできません | エラー 7235
6 ★★ を型に解決できません | エラー(エラー) 6398
7 プラグイン "org.eclipse.ui.workbench" からのコードの起動で問題が発生しました | エラー(エラー) 5354
8 「Android Studio 3.0.1」で、デザインプレビュー画面が表示されない。「waiting build for finish」が終わらない | Android Studio(IDE) 4472
9 Android FAQ 3582
10 Androidエミュレータで、PCキーボード入力を有効にしたい | エミュレータ(環境構築) 3263
11 Eclipse で「パッケージ名」変更 | Eclipse(IDE) 2775
12 キーバインドの競合が発生しました。 通常のアクセラレーター操作を妨げる可能性があります。 | エラー(エラー) 2464
13 Eclipseが起動しない … ユーザ操作は待機中です | Eclipse(IDE) 2368
14 Eclipse で「プロジェクト名」「パッケージ名」を変更する方法 | Eclipse(IDE) 2270
15 Android Studio で、ソースコードが改行できない | Android Studio(IDE) 2095
16 内部エラーの表示中に内部エラーが発生しました | エラー 1968
17 このメソッドは型 ○○ の結果を戻す必要があります | エラー(エラー) 1788
18 インポートされた java.io は見つかりません | エラー(エラー) 1642
19 エラーが発生しました。ログ・ファイル ★★.log.を参照してください | エラー(エラー) 1446
20 エディターを開くことができません: 予期しない例外が起こりました。 | エラー(エラー) 1159
2026/8/17 5:05 更新