Compilation failed; see the compiler error output for details

时间:2024-03-14 08:43:57

错误:Compilation failed; see the compiler error output for details.


Compilation failed; see the compiler error output for details


解决


修改build.gradle文件下的dependencies下的classpath配置版本。如下图所示:


Compilation failed; see the compiler error output for details


在这里修改Androidstudio classpath对应的版本就OK了。例如我的是3.0.1,如下所示:


repositories {
    google()
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.1.2'
    

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}


修改完毕,如下图所示:


Compilation failed; see the compiler error output for details


我们只需要点击Sync Now就可以解决问题了。