Android manifest file with properties from another properties file

In the general Android manifest for my app using google map v2, it looks something like this:

<manifest> ... <application> ... <!-- Goolge API Key --> <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="XYZ...ZYX" /> ... </application> <manifest> 

The question is, is it possible to do something like this:

 <manifest> ... <application> ... <!-- Goolge API Key --> <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="@{my.google.api.key}" /> ... </application> <manifest> 

and my_local.property file in my project with the line: my.google.api.key = XYZ ... ZYX?

+6
source share
2 answers

You can use string resources for this, and the manifest will be

 android:value="@string/google_api_key" 
+2
source

Currently, I believe you can use placeholder manifests to achieve what you need.

0
source

All Articles