Harald Wilhelm
Harald Wilhelm

Reputation: 6716

Is versionCode/versionName required in library manifest?

Below is a manifest of one of my library projects. Currently I increase the versionCode and versionName with every change. Is that required?

<?xml version="1.0" encoding="utf-8"?>

<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:installLocation="preferExternal" 
    android:versionCode="14"
    android:versionName="1.1.7"
    package="com.tubala.android" >

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <uses-sdk
        android:minSdkVersion="7"
        android:targetSdkVersion="11" />
</manifest> 

Thanks in advance.

Upvotes: 8

Views: 2790

Answers (2)

inazaruk
inazaruk

Reputation: 74790

Currently AndroidManifest.xml of Android Library is completely ignored when building application that uses this library. The only thing that is used by aapt tool is package attribute (to generate R class into correct package).

This might be changed in next releases. But I'd say you should keep your versioning anyway. This is a good practice (even if build tools are ignoring it).

Upvotes: 6

Michael
Michael

Reputation: 54725

android:versionName attribute is not necessary. It's just a version users see when they open your application information in the application manager.

android:versionCode is more important. You must increase it every time you publish your application on the Android Market.

Upvotes: -2

Related Questions