ThexXTURBOXx / dex2jar

Tools to work with android .dex and java .class files
Apache License 2.0
231 stars 57 forks source link

Hello, it seems that dx does not support syntax sugar removal. #53

Open JhinSir opened 1 week ago

JhinSir commented 1 week ago

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

JhinSir commented 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