Home > Mobile >  There are familiar with android productFlavors function? Want to separate the map function, can do i
There are familiar with android productFlavors function? Want to separate the map function, can do i

Time:03-06

Application has a map function, with very few people, want to separate very 2 version, otherwise update, size is very big,

Baidu map function, involving
Androidmanifest.xml file defines the key

layout defines the controlsInside the Java source code defines the import
Build. Gradle defines the implementation files (' SRC/main/jniLibs/BaiduLBS_Android jar ')


=========================================
2 productFlavors simple isolation Java layout will be used, but cannot be:
Build. Gradle and isolated from the import,

[build. Gradle]
BaiduImplementation files (' SRC/Baidu/jniLibs/BaiduLBS_Android jar ')
There seems to be a little problem, and can't find the reason,

[for the import and layout problem]
I don't want to make it two Java or layout file, is not conducive to update,
If it is vc + +, you can use precompiled directives
# ifdef
# endif
This block, the android how to do?

  • Related