去除代码activity代码页面顶部中的 import android.R;这句 就可以消除红色波浪线的main cannot be resolved or is not a field类似这个错误了 转载于:https://www.cnblogs.com/wudizbb/p/3545877.html