Вопрос

Is it possible to get the android:versionCode & android:versionName from the AndroidManifest.xml file and use them in my Ant build.xml file? I would like to incorporate these values in my APK when built at compile time.

Это было полезно?

Решение

I believe you could use the XMLProperties task to achieve this.

<xmlproperty file="AndroidManifest.xml"/>

Should give you:

manifest(android:versionCode)="1"
manifest(android:versionName)="1.0"

According to the definition in the Ant manual though I haven't tried/tested it.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top