英文:
How to import java class that is in the generated folder?
问题
基本上我在使用 Protocol Buffers(protobuf)。protobuf 允许我通过 protobuf 插件(Gradle)生成 Java 代码(.java 文件)。
我的问题是生成的代码位于 build -> generated -> source -> proto -> main -> java 目录中,我很难将生成的代码导入到实际代码中(位于 src 文件夹中)。
英文:
So basically I'm using protobuf. Protobuf enables me to generate java code (.java files) thanks to the protobuf-plugin (gradle).
My problem is that the code is generated in the build -> generated -> source -> proto -> main -> java and I struggle to import the code that has been generated in my actual code (located in the src folder).
专注分享java语言的经验与见解,让所有开发者获益!
评论