开发者

Is versionCode/versionName required in library manifest?

开发者 https://www.devze.com 2023-04-04 14:40 出处:网络
Below i开发者_开发问答s a manifest of one of my library projects. Currently I increase the versionCode and versionName with every change. Is that required?

Below i开发者_开发问答s 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.


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).


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消