[android-developers] Retrieve android:versionName from Library Project
Hi, I have created a Library Project which I import into another project. In that Library Project at some point I retrieve it's android:versionName To do that you need to supply the package name. The problem arises when that code is executed when the Library Project is included within another project, then it seems that that code throws an exception : 10-04 10:15:36.987: WARN/System.err(1407): getSoftwareVersion(), Caught Exception : android.content.pm.PackageManager$NameNotFoundException: mobilaria.android.LandenPlayerCodeBase.baseplayer Thats the package name of the package of the Project Library... it seems it cannot find it even though the same code that is executing that call is part of the Library itself... Does anyone have experienced something like this or has an idea on how to solve this ? /edit : I posted this on stackoverflow as well and someone responded with : As far as I know android library project manifest is ignored at the moment, manifest is not merged into end application when you reference a library. Hence you cant extract any data from the library's manifest. So my question now is : hhmmm ok, that would explain it I guess... But is there any official statement or anyone who knows this for sure ? For example someone who has already worked with a Library Project extensively before ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Retrieve android:versionName from Library Project
On Mon, Oct 4, 2010 at 8:27 AM, MobDev developm...@mobilaria.com wrote: /edit : I posted this on stackoverflow as well and someone responded with : As far as I know android library project manifest is ignored at the moment, manifest is not merged into end application when you reference a library. Hence you cant extract any data from the library's manifest. So my question now is : hhmmm ok, that would explain it I guess... But is there any official statement or anyone who knows this for sure ? I am fairly certain the quoted passage above is correct. At the moment, AFAIK, there is no concept of the library's version being carried forward into the application, simply because there is no place to put it. Use a string resource instead of android:versionName. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en