新的android studio (4.2)已經不支持舊有的
com.android.tools.build:gradle:2.3.3
了,有些方法和類會找不到。
去build.gradle中把這個classpath換成最新的版本。最好也把gradle和gradle wrapper的版本也弄到最新。比如:
dependencies { classpath 'com.android.tools.build:gradle:4.2.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files }