Layout, Drawable, and id cannot be resolved error in Android

view full story

http://stackoverflow.com – I'm having errors in my layout, drawable, and id. I have already checked my imports, I am not importing anything from other projects. Here is the code that contains errors. I hope you can help me find out the error. :) Actually, the error pops out when I included some static strings. Whenever I remove the static strings and the for loop that uses the static strings P, Q, R, S, T, the error vanishes. I am posting the whole java file here. package com.example.edgedetection; import android.app.Activity; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphi (HowTos)