如何在一个项目中使用 sugar orm 和 google 分析

How to Use sugar orm and google analytics at one project

Sugar ORM 要求我将 android:name 设置为 com.orm.SugarApp 才能运行。 如何使用其他也需要更改我的 android:name 的库?

我试试 :

public class Manage extends SugarApp {

    @Override
    public void onCreate() {
        super.onCreate();
        // do any thing
    }
}


<application
    android:name=".Manage"
    ...
>

t 没有保存任何东西! 在我删除应用程序并使用

进行测试后
<application
    android:name="com.orm.SugarApp"
    ...
>

可以用,但我的东西不行

在以前的版本中它显示强制关闭但在当前版本中1.4我可以轻松解决它 我做了 Class Extends SugarApp 但 Sugar Context 没有初始化

public class Manage extends SugarApp {

    // Here This Method Overrideed    
    @Override
    public void onCreate() {
        super.onCreate();
        SugarContext.init(this); // Here This Method Called
        LTH.dLog("Manage_TAG", "On Create Manage Class");
    }

    // Here This Method Overrideed
    @Override
    public void onTerminate() {
        super.onTerminate();
        SugarContext.terminate(); // Here This Method Called
        LTH.dLog("Manage_TAG", "On Terminate Manage Class");
    }
}