So I’ve been messing with Android development for awhile now and one of the noob errors I stumbled on awhile back was the compile error…

“main cannot be resolved or is not a field”

What this usually is caused by is letting Eclipse resolve the compile problem of “main” not being found. It resolves this by importing android.R. This is obviously not what we want.

To fix this simply change the import to be …

import hello.World.R

or whatever your package is named. This will resolve the “main” problem. Hopefully this helps!