Android Context为空

Context context = BaseApplication.getApp().getApplicationContext();
如果content为null
则:

android:name="com.tcrj.government.application.BaseApplication"

<application
android:name="com.tcrj.government.application.BaseApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/Theme.AppCompat">
<activity
android:name=".LoginActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.tcrj.government.activitys.NewsListActivity" />
</application>
 
posted @ 2015-09-18 14:35  逍遥散人95  阅读(907)  评论(0编辑  收藏  举报