Android Studio编译报错:
错误: 对findViewById的引用不明确 Activity 中的方法 findViewById(int) 和 AppCompatActivity 中的方法 findViewById(int) 都匹配 其中, T是类型变量: T扩展已在方法 findViewById(int)中声明的View
Methods findViewById(int) from android.app.Activity and findViewById(int) from android.support.v7.app.AppCompatActivity are inherited with the same signature
解决方案:
各工程compileSdkVersion不一致,应该进行统一,一般向高版本看齐。
关于我厦门大学计算机专业 | 前华为工程师 Java | 安卓 | 前端 | 小程序 | 鸿蒙 公众号:蓝不蓝编程