Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要读取 android 清单文件并从中复制一些值,例如 java 程序中的启动器活动、包名称、活动路径等。这是最好的方法
我使用以下代码从 AndroidManifest.xml 读取版本号
PackageInfo pinfo = null; try { pinfo = getPackageManager().getPackageInfo(getPackageName(),0); } catch(Exception e) { e.printStackTrace(); }
您可以阅读以下版本信息,
String version = pinfo.versionName;
同样的方式你可以使用其他属性
我在应用程序中使用 p:gmap 组件,但是当我尝试使用绑定属性来引用 bean 中的 GMap 时,它不起作用并且地图不显示。
JSF 代码:
<p:gmap binding="#{mapBean.map}" center=" -26.9995, -49.68