最近接手一个新项目,发现一拉取代码就一大片的红,我试着运行了一下也没问题
尝试了网上的很多方法清除缓存什么的都没用,
最后才发现是build:gradle版本太低了,因为他们要用的某个插件必须降级才能使用,本来是
3.2.0,升级了之后代码就不报红了
dependencies { classpath 'com.android.tools.build:gradle:3.4.0' classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10' // hms classpath 'com.huawei.agconnect:agcp:1.6.0.300' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files }