Hi, all

I've read the android document and it say that <manifest>'s
android:versionName can be set with string reference. but when I set
it as following:

android:versionName="@string/version"

and in strings.xml I wrote:

<string name="version">1.2.7</string>

and try to read it by code:

            PackageInfo pinfo = getPackageManager().getPackageInfo
(getPackageName(), 0);
            return pinfo.versionName;

I got a null string.

but it can be read when I use raw-string:
android:versionName="1.2.7"

How can I get the correct versionName when it used reference? thanks.

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to