Open JhinSir opened 1 week ago
我验证了一段代码能够百分百复现。
private static void setRootView(Activity activity) {
ViewGroup parent = (ViewGroup) activity.findViewById(android.R.id.content);
for (int i = 0, count = parent.getChildCount(); i < count; i++) {
View childView = parent.getChildAt(i);
if (childView instanceof ViewGroup) {
childView.setFitsSystemWindows(true);
((ViewGroup) childView).setClipToPadding(true);
}
}
}
当这段代码被转换时,会百分百NullPointExecption。 rootview.zip
error.zip The version I use is JDK17, gradle version 8.2, targetSDK 34. In higher versions, Google removed dx and adopted d8. I found that these errors are all syntax sugar errors