我正在尝试在Android项目中使用JESS。我尝试使用Jess 6,它在netbeans的Web应用程序上运行良好,但出现错误。似乎jar文件的版本不兼容。
我需要有关如何将jess与Android项目集成的帮助。

错误是从一行代码生成的:

Rete engine = new Rete();


请参阅下面的错误记录:

 2593-2593/com.example.modupe.tryjessapp E/AndroidRuntime: FATAL EXCEPTION: main
 Process: com.example.modupe.tryjessapp, PID: 2593
 java.lang.NoClassDefFoundError: Failed resolution of: Ljava/applet/Applet;
     at jess.Rete.getApplet(Unknown Source)
     at jess.Batch.batch(Unknown Source)
     at jess.Rete.if(Unknown Source)
     at jess.Rete.<init>(Unknown Source)
     at jess.Rete.<init>(Unknown Source)
     at jess.Rete.<init>(Unknown Source)
     at com.example.modupe.tryjessapp.MainActivity.<init>(MainActivity.java:17)
     at java.lang.Class.newInstance(Native Method)
     at android.app.Instrumentation.newActivity(Instrumentation.java:1078)
     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2557)
     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)
     at android.app.ActivityThread.-wrap12(ActivityThread.java)
     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)
     at android.os.Handler.dispatchMessage(Handler.java:102)
     at android.os.Looper.loop(Looper.java:154)
     at android.app.ActivityThread.main(ActivityThread.java:6119)
     at java.lang.reflect.Method.invoke(Native Method)
     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
  Caused by: java.lang.ClassNotFoundException: Didn't find class "java.applet.Applet" on path: DexPathList[[zip file "/data/app/com.example.modupe.tryjessapp-1/base.apk", zip file "/data/app/com.example.modupe.tryjessapp-1/split_lib_dependencies_apk.apk", zip file "/data/app/com.example.modupe.tryjessapp-1/split_lib_slice_0_apk.apk", zip file "/data/app/com.example.modupe.tryjessapp-1/split_lib_slice_1_apk.apk", zip file "/data/app/com.example.modupe.tryjessapp-1/split_lib_slice_2_apk.apk", zip file "/data/app/com.example.modupe.tryjessapp-1/split_lib_slice_3_apk.apk", zip file "/data/app/com.example.modupe.tryjessapp-1/split_lib_slice_4_apk.apk", zip file "/data/app/com.example.modupe.tryjessapp-1/split_lib_slice_5_apk.apk", zip file "/data/app/com.example.modupe.tryjessapp-1/split_lib_slice_6_apk.apk", zip file "/data/app/com.example.modupe.tryjessapp-1/split_lib_slice_7_apk.apk", zip file "/data/app/com.example.modupe.tryjessapp-1/split_lib_slice_8_apk.apk", zip file "/data/app/com.example.modupe.tryjessapp-1/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.example.modupe.tryjessapp-1/lib/x86, /system/lib, /vendor/lib]]
....

最佳答案

Jess使用了Dalvik不支持的许多Java API,Applet是其中之一,更重要的是,java.beans.Introspector。具备Android功能的Jess版本仅可作为Alpha版本提供给被许可方;它尚未发布。

10-07 22:37