@@ -0,0 +1,907 @@
+package com.matao.common.util;%0A%0Aimport android.content.Context;%0Aimport android.content.pm.PackageInfo;%0Aimport android.content.pm.PackageManager;%0A%0A/**%0A * Created by matao on 2016-12-23 00:33%0A */%0A%0Apublic class AppUtils %7B%0A%0A    public static int getAppVersionCode(Context context) %7B%0A        try %7B%0A            PackageInfo info = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);%0A            return info.versionCode;%0A        %7D catch (PackageManager.NameNotFoundException e) %7B%0A            e.printStackTrace();%0A        %7D%0A        return 1;%0A    %7D%0A%0A    public static String getAppVersionName(Context context) %7B%0A        try %7B%0A            PackageInfo info = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);%0A            return info.versionName;%0A        %7D catch (PackageManager.NameNotFoundException e) %7B%0A            e.printStackTrace();%0A        %7D%0A        return %22%22;%0A    %7D%0A%7D%0A

Add AppUtils