package com.example.xpweather;

import android.app.Application;

import com.lzy.okgo.OkGo;

import org.litepal.LitePalApplication;


/**
 * Created by 肖磊 on 2017/8/7.
 */

public class APP extends Application{
    @Override
    public void onCreate() {
        super.onCreate();
        LitePalApplication.initialize(this);
        OkGo.getInstance().init(this);
    }
}

@@ -59,16 +59,49 @@
 cation;%0D
+%0Aimport android.content.Context;%0D
 %0A%0D%0Aimpor
@@ -247,19 +247,256 @@
 lication
+ 
 %7B%0D%0A
+    private static APP instance;%0D%0A%0D%0A    // %E5%85%A8%E5%B1%80 Context %E8%8E%B7%E5%8F%96%0D%0A    public static Context getAppContext() %7B%0D%0A        return instance.getApplicationContext();%0D%0A    %7D%0D%0A%0D%0A    public static APP getInstance() %7B%0D%0A        return instance;%0D%0A    %7D%0D%0A%0D%0A
     @Ove
@@ -555,24 +555,50 @@
 nCreate();%0D%0A
+        instance = this;%0D%0A
         Lite

add instance