Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JhinSir opened this issue Sep 11, 2024 · 2 comments
Open

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

JhinSir opened this issue Sep 11, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@JhinSir
Copy link

JhinSir commented Sep 11, 2024

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
Copy link
Author

JhinSir commented Sep 12, 2024

我验证了一段代码能够百分百复现。

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

@ThexXTURBOXx ThexXTURBOXx added the bug Something isn't working label Sep 15, 2024
@Rabbit0w0
Copy link

Can you provide the APK file?
您能提供APK文件吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants