如何添加两款Android:名称清单文件属性,以应用标签? [英] how to Add two android:name attributes to Application tag in Manifest file?

查看:305
本文介绍了如何添加两款Android:名称清单文件属性,以应用标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Andr​​oid应用程序需要两个应用程序类,一类是凌空的AppController,另一种是分析class.I感到困惑如何既在time.please添加帮助我,让我离开这一点。

My Android application requires two application classes,one is volley AppController and another one is Analytics class.I am confused how to add both at a time.please help me and get me out of this.

推荐答案

您需要实现多级继承来解决这种情况。

You need to implement Multilevel inheritance to resolve this scenario.

这是您的方案

public Lib1Application extends Application{

}

public Lib2Application extends Application{

}

public YourApplication extends Application{

}

如何解决?

公共Lib1Application扩展应用{

public Lib1Application extends Application{

}

public Lib2Application extends Lib1Application{

}

public YourApplication extends Lib2Application{

}

终于在mainfest.xml

<application
        android:name="com.your.packagename.YourApplication"
        android:icon="@drawable/ijoomer_luncher_icon"
        android:label="@string/app_name"
 >

这篇关于如何添加两款Android:名称清单文件属性,以应用标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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