若在導入他人工程是報此錯誤,請在build.gradle文件中將編譯版本修改爲自己新建工程的版本,如將下圖所示的1.3.0修改爲1.5.0
buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.3.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() } } task clean(type: Delete) { delete rootProject.buildDir }