diff --git a/cocos/ui/widget-manager.ts b/cocos/ui/widget-manager.ts index 0ff9b103056..cb4085f5974 100644 --- a/cocos/ui/widget-manager.ts +++ b/cocos/ui/widget-manager.ts @@ -204,7 +204,7 @@ function align (node: Node, widget: Widget): void { // TODO: type is hack, Change to the type actually used (Node or BaseNode) when BaseNode complete function visitNode (node: any): void { const widget = node.getComponent(Widget); - if (widget && widget.enabled && cclegacy.isValid(widget, true)) { + if (widget && widget.enabled) { if (DEV) { widget._validateTargetInDEV(); } diff --git a/cocos/ui/widget.ts b/cocos/ui/widget.ts index 532a33f5cbf..44727d2af13 100644 --- a/cocos/ui/widget.ts +++ b/cocos/ui/widget.ts @@ -852,9 +852,6 @@ export class Widget extends Component { } public onDestroy (): void { - // `onDisable` is skipped when the component was never enabled by the scheduler - // (`IsOnEnableCalled` unset), so unregister here as well. - cclegacy._widgetManager?.remove(this); this._removeParentEvent(); } diff --git a/templates/google-play/build/gradle.properties b/templates/google-play/build/gradle.properties index 582f665e42a..56e9e49ed06 100644 --- a/templates/google-play/build/gradle.properties +++ b/templates/google-play/build/gradle.properties @@ -27,7 +27,8 @@ android.native.buildOutput=verbose PROP_COMPILE_SDK_VERSION=36 # Android SDK version that will be used as the earliest version of android this application can run on -PROP_MIN_SDK_VERSION=21 +# play-services-oss-licenses, introduced on Feb 2, 2026, requires minSdkVersion 24. https://developers.google.com/android/guides/releases +PROP_MIN_SDK_VERSION=24 # Android SDK version that will be used as the latest version of android this application has been tested on PROP_TARGET_SDK_VERSION=36