gradle - Android 中 BuildConfig文件为什么能直接使用?
怪我咯
怪我咯 2017-04-18 09:17:03
0
2
488

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

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

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(2)
洪涛

gradle has sourceSetsomething to say. The generated code under build and the handwritten code under main/test are all within the SourceSet at compile time.

PHPzhong

In fact, this BuildConfig class is similar to the R class, and there is also apt or similar ASM.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!