美文网首页
Android Studio编译错误总结

Android Studio编译错误总结

作者: 岩巴上的枯松 | 来源:发表于2021-01-15 10:17 被阅读0次

Caused by: org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreationException: Could not create task ':app:processMainDebugManifest'.
Caused by: java.lang.IllegalStateException: Duplicate key BuildableArtifactImpl (file collection)

解决方法:将打包渠道配置中的main修改为其他名称。


image.png

Caused by: org.gradle.api.plugins.UnknownPluginException: Plugin with id 'com.github.dcendents.android-maven' not found.
Caused by: java.lang.IllegalStateException: compileSdkVersion is not specified.

解决方法:在项目下的build.gradle中dependenceies添加:
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'

Error: Invoke-customs are only supported starting with Android O (--min-api 26) 或
Error:Default interface methods are only supported starting with Android N (--min-api 24)
解决方法:在app下build.gradle的defaultConfig下加入配置:
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}


image.png

相关文章

网友评论

      本文标题:Android Studio编译错误总结

      本文链接:https://www.haomeiwen.com/subject/yhmiaktx.html