判断Android 当前版本是否为debug版本

public static boolean isDebugVersion(Context context) {
   try {
      ApplicationInfo info = context.getApplicationInfo();
      return (info.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;
   } catch (Exception e) {
      e.printStackTrace();
   }
   return false;
}
 

 

posted @ 2018-06-03 10:18  netcorner  阅读(1919)  评论(0编辑  收藏  举报