在JavaFX应用程序

时间:2016-03-29 16:40:37

标签: java ant javafx-8 proguard

在JavaFX应用程序上运行proguard后,我收到以下错误。如果不使用proguard,应用程序运行正常。我搜索过StackOverflow并发现了一些帖子,但是我尝试了一些不同的答案却没有成功。

Exception in thread "JavaFX Application Thread" Exception in thread "main" java. lang.NoClassDefFoundError: com/sun/jna/win32/StdCallLibrary$StdCallCallback at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at com.sun.javafx.application.LauncherImpl.lambda$launchApplicationWithA rgs$153(Unknown Source) at com.sun.javafx.application.LauncherImpl$$Lambda$44/1645995473.run(Unk nown Source) at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$172(Unknown Source) at com.sun.javafx.application.PlatformImpl$$Lambda$46/355629945.run(Unkn own Source) at com.sun.javafx.application.PlatformImpl.lambda$null$170(Unknown Sourc e) at com.sun.javafx.application.PlatformImpl$$Lambda$48/1337124724.run(Unk nown Source) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$171(Unknown S ource) at com.sun.javafx.application.PlatformImpl$$Lambda$47/1915503092.run(Unk nown Source) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source) at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at com.sun.glass.ui.win.WinApplication.lambda$null$145(Unknown Source) at com.sun.glass.ui.win.WinApplication$$Lambda$36/1963387170.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.ClassNotFoundException: com.sun.jna.win32.StdCallLibrary$St dCallCallback at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 28 more java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at sun.launcher.LauncherHelper$FXHelper.main(Unknown Source) Caused by: java.lang.NullPointerException at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(Unk nown Source) at com.sun.javafx.application.LauncherImpl.launchApplication(Unknown Sou rce) ... 5 more

我在我的专业配置中有以下内容,试图在错误消息中保留几乎所有内容,希望能够找到解决方案。

-keep class com.sun.javafx.** { *; }
-keep interface com.sun.jna.** { *; }

-keep class com.sun.jna.** { *; }
-keep class com.sun.jna.win32.StdCallLibrary { public *; }
-keepclassmembers class * extends com.sun.jna.** {
    <fields>;
    <methods>;
}
-keep interface * extends com.sun.jna.** { *; }
-keep class * implements com.sun.jna.** { *; }

打开详细信息后,运行ant构建脚本时会看到以下内容。

 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.WeakReferenceQueue'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.beans.event.AbstractNotifyListener'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.css.Selector'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.css.StyleCache'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.css.StyleCache$Key'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.css.StyleManager'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.css.StyleManager$1'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.css.StyleManager$CacheContainer'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.css.StyleMap'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.css.Stylesheet'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.event.BasicEventDispatcher'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.event.CompositeEventDispatcher'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.event.EventHandlerManager'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.fxml.LoadListener'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.fxml.ParseTraceElement'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.geom.BaseBounds'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.geom.Ellipse2D'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.geom.Path2D'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.geom.PathConsumer2D'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.geom.PickRay'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.geom.Point2D'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.geom.RectangularShape'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.geom.Shape'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.geom.Vec2d'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.geom.Vec3d'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.geom.transform.Affine3D'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.geom.transform.AffineBase'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.geom.transform.BaseTransform'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.geom.transform.CanTransformVec3d'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.jmx.MXNodeAlgorithm'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.jmx.MXNodeAlgorithmContext'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.perf.PerformanceTracker'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.runtime.async.AsyncOperation'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.runtime.async.AsyncOperationListener'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.scene.CssFlags'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.scene.DirtyBits'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.scene.LayoutFlags'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.scene.control.ReadOnlyUnbackedObservableList'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.scene.control.skin.FXVK'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.scene.input.PickResultChooser'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.scene.text.GlyphList'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.scene.text.HitInfo'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.scene.text.TextLayout'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.scene.text.TextSpan'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.scene.traversal.Direction'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.scene.traversal.ParentTraversalEngine'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.scene.traversal.TraversalEngine'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.scene.web.Debugger'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.sg.prism.NGNode'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.sg.prism.NGShape$Mode'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.stage.WindowEventDispatcher'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.stage.WindowPeerListener'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.tk.ImageLoader'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.tk.PlatformImage'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.tk.TKDragGestureListener'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.tk.TKPulseListener'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.tk.TKScene'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.tk.TKStage'
 [proguard] Note: the configuration explicitly specifies 'com.sun.javafx.**' to keep library class 'com.sun.javafx.tk.TKStageListener'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.AltCallingConvention'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.Callback'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.Callback$UncaughtExceptionHandler'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.FunctionMapper'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.Library'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.Native$ffi_callback'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.NativeMapped'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.TypeMapper'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.Version'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.BaseTSD'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.Guid'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.Kernel32'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinBase'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinDef'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinError'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinNT'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinNT$OVERLAPPED_COMPLETION_ROUTINE'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.win32.StdCall'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.win32.StdCallLibrary'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.win32.StdCallLibrary$StdCallCallback'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.AltCallingConvention'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.Callback'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.Callback$UncaughtExceptionHandler'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.CallbackThreadInitializer'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.FromNativeContext'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.FunctionMapper'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.IntegerType'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.Library'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.Memory'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.Native'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.Native$ffi_callback'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.NativeLibrary'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.NativeLong'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.NativeMapped'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.Pointer'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.PointerType'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.Structure'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.Structure$StructField'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.TypeMapper'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.Version'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.WString'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.BaseTSD'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.BaseTSD$LONG_PTR'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.BaseTSD$ULONG_PTRByReference'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.Guid'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.Guid$GUID'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.Guid$IID'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.Kernel32'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.Ole32Util'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.Tlhelp32$PROCESSENTRY32'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinBase'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinBase$FILETIME'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinBase$MEMORYSTATUSEX'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinBase$OVERLAPPED'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinBase$PROCESS_INFORMATION'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinBase$SECURITY_ATTRIBUTES'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinBase$STARTUPINFO'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinBase$SYSTEMTIME'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinBase$SYSTEM_INFO'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinDef'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinDef$DWORD'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinDef$DWORDByReference'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinDef$HINSTANCE'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinDef$HMODULE'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinDef$HWND'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinDef$LCID'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinDef$LPARAM'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinDef$LRESULT'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinDef$UINT_PTR'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinDef$WPARAM'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinError'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinNT'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinNT$FILE_NOTIFY_INFORMATION'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinNT$HANDLE'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinNT$HANDLEByReference'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinNT$HRESULT'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinNT$LARGE_INTEGER'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinNT$OSVERSIONINFO'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinNT$OSVERSIONINFOEX'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.platform.win32.WinNT$OVERLAPPED_COMPLETION_ROUTINE'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.ptr.ByReference'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.ptr.IntByReference'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.ptr.LongByReference'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.ptr.PointerByReference'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.win32.StdCall'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.win32.StdCallLibrary'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.**' to keep library class 'com.sun.jna.win32.StdCallLibrary$StdCallCallback'
 [proguard] Note: the configuration explicitly specifies 'com.sun.jna.win32.StdCallLibrary' to keep library class 'com.sun.jna.win32.StdCallLibrary'

解决方法 如果我将以下内容添加到proguard配置中,我可以解决该问题并使其运行。

-dontoptimize

我认为我真的想要进行优化,但它看起来并没有像现有的那样混淆。我怎样才能绕过这个问题,但我能做最多的混淆?

1 个答案:

答案 0 :(得分:1)

好吧,如果有人偶然发现并遇到类似的问题,我已经通过在运行之前不将我的jar文件移动到另一个位置来修复我的问题。我收到NoClassDefFoundError错误,因为尝试使用的类位于libs文件夹中,在我移动.jar(而不是libs文件夹)后无法访问这些文件夹。一个非常容易解决的问题,但是在StackOverflow上找到了很多不同的建议我没想到现在看起来非常明显的东西。