1
java.lang.NullPointerException
        at org.pushingpixels.substance.internal.utils.SubstanceColorUtilities.e(
Unknown Source)
        at org.pushingpixels.substance.internal.utils.SubstanceColorUtilities.z(
Unknown Source)
        at org.pushingpixels.substance.internal.ui.SubstancePanelUI.b(Unknown So
urce)
        at org.pushingpixels.substance.internal.ui.SubstancePanelUI.installDefau
lts(Unknown Source)
        at javax.swing.plaf.basic.BasicPanelUI.installUI(Unknown Source)
        at org.pushingpixels.substance.internal.ui.SubstancePanelUI.Y(Unknown So
urce)
        at org.pushingpixels.substance.internal.ui.SubstancePanelUI.installUI(Un
known Source)
        at javax.swing.JComponent.setUI(Unknown Source)
        at javax.swing.JPanel.setUI(Unknown Source)
        at javax.swing.JPanel.updateUI(Unknown Source)
        at javax.swing.JPanel.<init>(Unknown Source)
        at javax.swing.JPanel.<init>(Unknown Source)
        at javax.swing.JPanel.<init>(Unknown Source)
        at javax.swing.JRootPane.createGlassPane(Unknown Source)
        at javax.swing.JRootPane.<init>(Unknown Source)
        at javax.swing.JFrame.createRootPane(Unknown Source)
        at javax.swing.JFrame.frameInit(Unknown Source)
        at javax.swing.JFrame.<init>(Unknown Source)
        at aq.S(Unknown Source)
        at aq.<init>(Unknown Source)
        at cg.run(Unknown Source)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$200(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)

在混淆了我的客户之后,我现在得到了这个空指针。有谁知道为什么我在混淆后会出错,以及避免此类错误的任何可能解决方案?该罐子在混淆之前工作得非常好。

4

1 回答 1

1

有谁知道为什么我在混淆后会出错,...

混淆改变了一些事情。例如,如果您的代码库依赖于反射,那么混淆类、字段或方法名称可能会导致反射操作失败;例如,因为实际名称不再与代码中的字符串匹配。

请注意,反射可能发生在您正在使用的某些库中。

...以及避免此类错误的任何可能解决方案?

这取决于问题的实际原因。您需要调试经过混淆的程序才能弄清楚这一点。

但如果问题是反射,那么一种解决方案是告诉 Proguard 不要混淆需要反射使用的代码。

于 2013-10-27T02:55:56.413 回答