Compilation failed; see the compiler error output for details

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



解决


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




在这里修改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
}


修改完毕,如下图所示:




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


版权声明:本文为u014133119原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。