I get the same results... Anyone know of any workaround for this?

----------------------------------------------------------------------
There are only 10 types of people in the world...
Those who know binary and those who don't.
----------------------------------------------------------------------


On Mon, Dec 14, 2009 at 12:05 AM, TopCat <[email protected]> wrote:

> 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 [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-beginners%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to