ERROR: Cannot create variant 'android-lint' after configuration ':library:debugApiElements' has been

版权声明:本文为Mr.release原创文章,转载请标明出处

问题复现

ERROR: Cannot create variant ‘android-lint’ after configuration ‘:library:debugApiElements’ has been resolved

升级Android studio版本后,重新打开项目时出现
ERROR: Cannot create variant 'android-lint' after configuration ':library:debugApiElements' has been_第1张图片

问题解决

项目中全局搜索variant,在build.gradle中找到这句


	classpath = files(variant.javaCompile.classpath.files, project.android.getBootClasspath())

讲这句代码改为:

 doFirst {
            classpath = files(variant.javaCompile.classpath.files, project.android.getBootClasspath())
        }

然后同步下工程,问题解决
参考https://github.com/google/ExoPlayer/commit/13592dfb53ec99ce1fdb2744e34717dbdec9dea8

你可能感兴趣的:(android,问题解决,android-lint,android问题集锦)