Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
272 views
in Technique[技术] by (71.8m points)

Android 中 BuildConfig文件为什么能直接使用?

BuildConfig类在/build/generated/source/buildConfig目录下,请问,为什么在/src/java/<package> /下的Java类可以直接调用呢?

是不是编译时通过一些方法忽略了BuildConfig的物理路径?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

gradle 有sourceSet一说。build下的生成代码,main/test下的手写代码都在编译时的SourceSet之内。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...