程序类型已经存在:info.hoang8f.fbutton.BuildConfig。

时间:2022-10-26 08:52:42

My project can't build properly when i update my Gradle to latest version.

当我更新我的Gradle到最新版本时,我的项目无法正常构建。

This is my error log.

这是我的错误日志。

Program type already present: info.hoang8f.fbutton.BuildConfig
Message{kind=ERROR, text=Program type already present: 
info.hoang8f.fbutton.BuildConfig, sources=[Unknown source file], tool 
name=Optional.of(D8)}

1 个解决方案

#1


0  

I had the same issues and in my case the problem was that I used the same package name in two modules. I'm actually building a library and I think this is also the case for you: See here for more info: https://*.com/a/26531074/3734116

我有同样的问题,在我的情况下,问题是我在两个模块中使用了相同的包名。实际上,我正在构建一个库,我想这也是您的理由:在这里查看更多信息:https://*.com/a/26531074/3734116。

The error message just changed as Android Studio now uses the new D8 compiler instead of dx

当Android Studio使用新的D8编译器而不是dx时,错误消息才刚刚改变。

#1


0  

I had the same issues and in my case the problem was that I used the same package name in two modules. I'm actually building a library and I think this is also the case for you: See here for more info: https://*.com/a/26531074/3734116

我有同样的问题,在我的情况下,问题是我在两个模块中使用了相同的包名。实际上,我正在构建一个库,我想这也是您的理由:在这里查看更多信息:https://*.com/a/26531074/3734116。

The error message just changed as Android Studio now uses the new D8 compiler instead of dx

当Android Studio使用新的D8编译器而不是dx时,错误消息才刚刚改变。