You do not import R, that is done by the system. This error is usually caused by a spelling mistake in the manifest file. As a start in the android name tag use the full package instead of just .MainActivity.
eg andriod:name = "com.app.AppName.MainActivity"