Android `templateMergeStrategy` in strings.xml

What does the templateMergeStrategy property mean in an Android resource?

eg in Google Maps API key file

<string name="google_maps_key" templateMergeStrategy="preserve" translatable="false">
    AIza.......some...secret...key...
</string>

I would have expected a simple google (or duckduckgo) search to give me results, but unfortunately it only seems to give me Google Maps API questions.

Unfortunately the Android Developer Docs on "String Resources" are also lacking in that department.


From change log

Uses this to overwrite the instructions in the Google Maps template. Subsequent runs of the template always update the instructions with the user's current keystore credentials.

Also changed the Maps instructions to deep link into a Google developer console flow, which allows for easier key generation.


这意味着当创建新的Google地图活动时,Android Studio模板引擎会保留此行,因此您不会丢失密钥。


Well, I have found the following in Google Code

Following commit in Google code states

Uses this to overwrite the instructions in the Google Maps template. Subsequent runs of the template always update the instructions with the user's current keystore credentials.

链接地址: http://www.djcxy.com/p/88958.html

上一篇: UWP商店包构建自动化

下一篇: strings.xml中的Android`templateMergeStrategy`