AndroidManifest清单文件中已经声明Application的name,但getApplicationContext()获取的时候仍然空指针异常
publicclassMyApplicationextendsApplication{privatestaticMyApplicationinstance;/***初始化*/@OverridepublicvoidonCreate(){super.onCreate();}/***单例获取application实例*/publicstaticMyApplicationgetInstance(){syn