Open 992480014qq opened 5 months ago
解决方法 在LemonHelloPrivateSizeTool.java文件里
void setContext(Context context) { _metrics = new DisplayMetrics(); WindowManager windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); if (windowManager != null) { Display display = windowManager.getDefaultDisplay(); if (display != null) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { display.getRealMetrics(_metrics); } else { display.getMetrics(_metrics); } _density = context.getResources().getDisplayMetrics().density; } } }
解决方法 在LemonHelloPrivateSizeTool.java文件里