在Android Studio構建過程中是否有一種方法在基於風味的最終構建/ apk中包含特定的可繪製或任何其他文件。我擁有的是一個擴展到許多子應用程序的應用程序,這些應用程序的增加部分是因爲免費和專業版本。不同的「風味」包含不同的繪圖和數據文件。這主要是因爲我想分離出不同的口味,因爲有很多,應用程序將太大而無法將所有這些應用包含在一個以口味爲基礎的項目中。Android應用程序的風味,以包括輸出中的某些文件APK
這是多遠我與科研有: https://developer.android.com/studio/build/build-variants.html
我的應用程序分享所有版本相同的代碼,我只是想將數據和圖像隔離。如果我能夠解決drawables構建問題,我認爲口味將是一個完美的解決方案。
實例當前項目結構:
test.app1.pro
--src
--res
---drawables
---raw
...ect
test.app1.free
--src
--res
---drawables
---raw
...ect
test.app2.pro
--src
--res
---drawables
---raw
...ect
test.app2.free
--src
--res
---drawables
---raw
...ect
test.app3.pro
--src
--res
---drawables
---raw
...ect
...etc