0

我正在尝试在 javafxports 的帮助下在我的 android 设备中使用 JavaFX。我使用 XStream 在我的程序中解析一些 XML 文件。当我编译它们时,javafxports 输出以下警告:

Note: there were 9 classes trying to access annotations using reflection.
  You should consider keeping the annotation attributes
  (using '-keepattributes *Annotation*').
  (http://proguard.sourceforge.net/manual/troubleshooting.html#attributes)
Note: there were 32 classes trying to access generic signatures using reflection.
  You should consider keeping the signature attributes
  (using '-keepattributes Signature').
  (http://proguard.sourceforge.net/manual/troubleshooting.html#attributes)
Note: there were 56 unresolved dynamic references to classes or interfaces.
  You should check if you need to specify additional program jars.
  (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclass)
Note: there were 3 class casts of dynamically created class instances.
  You might consider explicitly keeping the mentioned classes and/or
  their implementations (using '-keep').
  (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclasscast)
Note: there were 39 accesses to class members by means of introspection.
  You should consider explicitly keeping the mentioned class members
  (using '-keep' or '-keepclassmembers').
  (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclassmember)
Note: you're ignoring all warnings!

输出 .apk 可以安装并运行,直到它调用 xstream 类来读取我的类中的注释。原因实际上已在警告中描述。

所以我的问题是,如何在生成 .apk 时禁用 proguard,或向其发送自定义 proguard.pro 配置。

而我的 build.gradle 和 helloworld 例子中的几乎一样。

谢谢。

4

0 回答 0