Tuesday, 15 February 2011

android - Use package name in XML -



android - Use package name in XML -

i'm using android studio build application. utilize gradle buildtypes. add together suffix bundle name applicationidsuffix modify bundle name test build type.

buildtypes { debug { runproguard false proguardfile 'proguard-rules.txt' applicationidsuffix '.dev' versionnamesuffix '-dev' } }

is possible utilize info in xml file. plan modify business relationship type:

<account-authenticator xmlns:android="http://schemas.android.com/apk/res/android" android:accounttype=<<package name here ??>> android:icon="@drawable/icon" android:label="@string/app_name"/>

thanks!

while uou can utilize ${packagename} fill in generated bundle name in manifest:

<account-authenticator xmlns:android="http://schemas.android.com/apk/res/android" android:accounttype="${packagename}" android:icon="@drawable/icon" android:label="@string/app_name"/>

this (android gradle 0.11) doesn't work resource files. :-(

instead, must create separate version of resource file each build type / variant want different business relationship type:

src debug/res/xml/authenticator.xml (with debug bundle name) main/res/xml/authenticator.xml (with default bundle name)

android xml gradle android-studio android-gradle

No comments:

Post a Comment