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)
在混淆了我的客户端之后,我现在得到了这个空指针。有谁知道为什么我在混淆后得到错误,以及避免这种错误的任何可能的解决方案?在混淆之前,jar工作得很好。
答案 0 :(得分:1)
有人知道为什么我在混淆后会出现错误,......
混淆改变了一些事情。例如,如果您的代码库依赖于反射,那么类,字段或方法名称的混淆可能导致反射操作失败;例如因为实际名称不再与代码中的字符串匹配。
请注意,您正在使用的某些库中可能会发生反射。
......以及避免此类错误的任何可能的解决方案?
这取决于问题的实际原因。您需要调试混淆程序来解决这个问题。
但如果问题是反思,那么一个解决方案是告诉Proguard不要混淆需要反思使用的代码。