使用 IntelliJ IDEA 15.0.2 生成签名 APK 时出现 NullPointerException
NullPointerException when generating signed APK with IntelliJ IDEA 15.0.2
升级到 IntelliJ IDEA 15.0.2 后,生成签名 APK 时出现以下异常,但 APK 已生成。
java.lang.NullPointerException
at org.jetbrains.android.exportSignedPackage.ExportSignedPackageWizard.run(ExportSignedPackageWizard.java:321)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.a(LaterInvocator.java:337)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:321)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access0(EventQueue.java:97)
at java.awt.EventQueue.run(EventQueue.java:709)
at java.awt.EventQueue.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:866)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:654)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:381)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
有什么提示吗?谢谢
这个和其他类似的错误是内部 IDE 错误,根据我的经验,不会影响最终的 APK 文件。虽然可能仍然存在一些隐藏的漏洞,但我建议先将问题报告给 JetBrains 团队,然后在 File --> Invalidate cache and Restart 之后尝试相同的过程。
如果问题仍然存在,请尝试使用较低版本的构建过程。
毕竟,我建议将项目迁移到 Android Studio。
升级到 IntelliJ IDEA 15.0.2 后,生成签名 APK 时出现以下异常,但 APK 已生成。
java.lang.NullPointerException
at org.jetbrains.android.exportSignedPackage.ExportSignedPackageWizard.run(ExportSignedPackageWizard.java:321)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.a(LaterInvocator.java:337)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:321)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access0(EventQueue.java:97)
at java.awt.EventQueue.run(EventQueue.java:709)
at java.awt.EventQueue.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:866)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:654)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:381)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
有什么提示吗?谢谢
这个和其他类似的错误是内部 IDE 错误,根据我的经验,不会影响最终的 APK 文件。虽然可能仍然存在一些隐藏的漏洞,但我建议先将问题报告给 JetBrains 团队,然后在 File --> Invalidate cache and Restart 之后尝试相同的过程。
如果问题仍然存在,请尝试使用较低版本的构建过程。 毕竟,我建议将项目迁移到 Android Studio。