从图书馆计划版本名称:Android的检索 [英] Retrieve android:versionName from Library Project

查看:96
本文介绍了从图书馆计划版本名称:Android的检索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个图书馆项目,我导入到另一个项目。
在某些点库项目我找回它的Andr​​oid:的versionName
要做到这一点,你需要提供软件包的名称。
当在图书馆项目包含另一个项目中被执行的code的出现问题,则似乎是code抛出异常:
10月10日至四日:15:36.987:WARN / System.err的(1407):getSoftwareVersion(),捕获的异常:android.content.pm.PackageManager $的NameNotFoundException:mobilaria.android.LandenPlayer codeBase.baseplayer

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

那包项目库的包名......似乎无法找到它,即使正在执行呼叫同一code是图书馆本身...

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 ?

推荐答案

据我所知的Andr​​oid库项目清单的那一刻被忽略,当你引用一个库清单不会合并到最终应用。因此,你不能从库的清单中提取任何数据。

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.

这篇关于从图书馆计划版本名称:Android的检索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆