是否可以动态更改Android清单属性? [英] Whether it is possible to change the Android manifest attribute dynamically?

查看:105
本文介绍了是否可以动态更改Android清单属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在android中动态设置Application属性,特别是我需要设置如下所示的Name字段,我需要动态更改它,因为我导入了两个库包,每个包将包含两个不同的Application类来维护会话变量,但是我可以在导入的项目中使用任何一个Application类,我需要根据要使用的包用户动态地使用两者,为此,我需要在Android Manifest.xml文件中动态设置和更改Application类名.

I need the set the Application attribute dynamically in android , particularly i need set the Name field which is shown below , i need to change it dynamically because i import two library packages each package will contain two different Application class to maintain session variable,but i can able to use any one Application class in imported project, i need to use that both dynamically based on the package user going to use, for that i need to set and change the Application class Name dynamically in Android Manifest.xml file.

如果有人知道解决方案,那就帮帮我.

if any one knows the solution means help me out.

谢谢.

推荐答案

您的清单位于apk内,并且已签名,因此动态更改清单将使整个程序包失效.我的猜测是不可能动态更改清单.

Your manifest is within your apk, which is signed, so changing it dynamically would invalidate the whole package. My guess is dynamically changing the manifest is not possible.

这篇关于是否可以动态更改Android清单属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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