-
Notifications
You must be signed in to change notification settings - Fork 215
Open
Description
releas包出现异常
java.lang.IllegalArgumentException: Scene k8.b must be a public class or public static class, and have only one parameterless constructor to be properly recreated from instance state.
at com.bytedance.scene.navigation.j.c6(NavigationScene.java:119)
at com.bytedance.scene.navigation.j.X5(NavigationScene.java:2)
at com.bytedance.scene.dialog.d.Y4(DialogScene.java:42)
代码为
private void pushInstance(@NonNull Scene scene, @Nullable PushOptions pushOptions) {
ThreadUtility.checkUIThread();
if (Utility.isActivityStatusValid(this.getActivity())) {
if (!this.isReusing(scene) && scene.getParentScene() != null) {
if (scene.getParentScene() == this) {
throw new IllegalArgumentException("Scene is already pushed");
} else {
throw new IllegalArgumentException("Scene already has a parent, parent " + scene.getParentScene());
}
} else if (this.isSupportRestore() && scene.isSceneRestoreEnabled() && !SceneInstanceUtility.isConstructorMethodSupportRestore(scene)) {
throw new IllegalArgumentException("Scene " + scene.getClass().getName() + " must be a public class or public static class, and have only one parameterless constructor to be properly recreated from instance state.");
} else {
if (pushOptions == null) {
pushOptions = (new PushOptions.Builder()).build();
}
this.hideSoftInputIfNeeded();
this.mNavigationSceneManager.push(scene, pushOptions);
}
}
}
发现有个合成的构造函数
// access flags 0x1000
synthetic <init>(Lcom/bytedance/scene/dialog/alert/AlertDialogScene$1;)V
L0
LINENUMBER 52 L0
ALOAD 0
INVOKESPECIAL com/bytedance/scene/dialog/alert/AlertDialogScene.<init> ()V
RETURN
L1
LOCALVARIABLE this Lcom/bytedance/scene/dialog/alert/AlertDialogScene; L0 L1 0
LOCALVARIABLE x0 Lcom/bytedance/scene/dialog/alert/AlertDialogScene$1; L0 L1 1
MAXSTACK = 1
MAXLOCALS = 2
附件是debug版本的字节码,也有两个构造函数
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels