我正在使用两个库(SUGAR ORM和Instabug)。它们都要求我在清单中使用应用程序的android:name标签。但是,看来您不可能有重复项,是否有办法解决?
我的清单:
<application
android:allowBackup="true"
android:label="@string/app_name"
android:icon="@drawable/runrouter_biggest"
android:theme="@style/MyTheme"
tools:replace="android:icon"
android:name="com.orm.SugarApp"
//I need to declare a second android:name here>
谢谢,马特
您似乎不走运。您只能有一个应用程序类实例,因此您只能在其中指定一个android:name
。
但是,您实际上并没有走运。Instabug不需要您使用他们的应用程序类,他们所需要的只是调用Instanbug.initialize(...)...
,您可以在派生自您的应用程序类中轻松地进行调用SugarApp
:
class MyApplication extends SugarApp
{
@Override
void onCreate()
{
super.onCreate();
Instabug.initialize(this)
.setAnnotationActivityClass(InstabugAnnotationActivity.class)
.setShowIntroDialog(true)
.setEnableOverflowMenuItem(true);
}
}
并在中定义此应用程序类android:name
。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句