03-28 15:52:36.586 25855-25855/? D/dalvikvm: Late-enabling CheckJNI
03-28 15:52:37.021 25855-25855/com.example.myapplication2.app E/TAG: START/data/data/com.example.myapplication2.app/lib-----INDEX 2 :/storage/emulated/0/Notes/sFileName
03-28 15:52:37.421 25855-25855/com.example.myapplication2.app I/dalvikvm: Could not find method java.io.File.toPath, referenced from method org.apache.lucene.store.NIOFSDirectory.createSlicer
03-28 15:52:37.422 25855-25855/com.example.myapplication2.app W/dalvikvm: VFY: unable to resolve virtual method 8318: Ljava/io/File;.toPath ()Ljava/nio/file/Path;
03-28 15:52:37.422 25855-25855/com.example.myapplication2.app D/dalvikvm: VFY: replacing opcode 0x6e at 0x000c
03-28 15:52:37.422 25855-25855/com.example.myapplication2.app I/dalvikvm: Could not find method java.io.File.toPath, referenced from method org.apache.lucene.store.NIOFSDirectory.openInput
03-28 15:52:37.422 25855-25855/com.example.myapplication2.app W/dalvikvm: VFY: unable to resolve virtual method 8318: Ljava/io/File;.toPath ()Ljava/nio/file/Path;
03-28 15:52:37.422 25855-25855/com.example.myapplication2.app D/dalvikvm: VFY: replacing opcode 0x6e at 0x000c
03-28 15:52:37.422 25855-25855/com.example.myapplication2.app I/dalvikvm: DexOpt: unable to optimize static field ref 0x0d85 at 0x14 in Lorg/apache/lucene/store/NIOFSDirectory;.createSlicer
03-28 15:52:37.422 25855-25855/com.example.myapplication2.app I/dalvikvm: DexOpt: unable to optimize static field ref 0x0d85 at 0x14 in Lorg/apache/lucene/store/NIOFSDirectory;.openInput
03-28 15:52:37.424 25855-25855/com.example.myapplication2.app I/System.out: in --------- indexd path NIOFSDirectory@/storage/emulated/0/Notes/sFileName lockFactory=NativeFSLockFactory@/storage/emulated/0/Notes/sFileName
03-28 15:52:37.587 25855-25855/com.example.myapplication2.app I/dalvikvm: Could not find method java.io.File.toPath, referenced from method org.apache.lucene.util.IOUtils.fsync
03-28 15:52:37.587 25855-25855/com.example.myapplication2.app W/dalvikvm: VFY: unable to resolve virtual method 8318: Ljava/io/File;.toPath ()Ljava/nio/file/Path;
03-28 15:52:37.587 25855-25855/com.example.myapplication2.app D/dalvikvm: VFY: replacing opcode 0x6e at 0x0001
03-28 15:52:37.588 25855-25855/com.example.myapplication2.app I/dalvikvm: DexOpt: unable to optimize static field ref 0x0d85 at 0x0b in Lorg/apache/lucene/util/IOUtils;.fsync
03-28 15:52:37.588 25855-25855/com.example.myapplication2.app I/dalvikvm: DexOpt: unable to optimize static field ref 0x0d86 at 0x24 in Lorg/apache/lucene/util/IOUtils;.fsync
03-28 15:52:37.631 25855-25855/com.example.myapplication2.app W/dalvikvm: VFY: unable to resolve exception class 1120 (Ljava/nio/file/NoSuchFileException;)
03-28 15:52:37.631 25855-25855/com.example.myapplication2.app W/dalvikvm: VFY: unable to find exception handler at addr 0xe
03-28 15:52:37.631 25855-25855/com.example.myapplication2.app W/dalvikvm: VFY: rejected Lorg/apache/lucene/index/IndexWriter;.slowFileExists (Lorg/apache/lucene/store/Directory;Ljava/lang/String;)Z
03-28 15:52:37.631 25855-25855/com.example.myapplication2.app W/dalvikvm: VFY: rejecting opcode 0x0d at 0x000e
03-28 15:52:37.631 25855-25855/com.example.myapplication2.app W/dalvikvm: VFY: rejected Lorg/apache/lucene/index/IndexWriter;.slowFileExists (Lorg/apache/lucene/store/Directory;Ljava/lang/String;)Z
03-28 15:52:37.631 25855-25855/com.example.myapplication2.app W/dalvikvm: Verifier rejected class Lorg/apache/lucene/index/IndexWriter;
03-28 15:52:37.631 25855-25855/com.example.myapplication2.app D/AndroidRuntime: Shutting down VM
03-28 15:52:37.632 25855-25855/com.example.myapplication2.app W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x4162fd40)
03-28 15:52:37.633 25855-25855/com.example.myapplication2.app E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.myapplication2.app, PID: 25855
java.lang.VerifyError: org/apache/lucene/index/IndexWriter
at com.example.myapplication2.app.Lucene2.openIndex(Lucene2.java:124)
at com.example.myapplication2.app.Lucene2.createIndex(Lucene2.java:87)
at com.example.myapplication2.app.MainActivity.onCreate(MainActivity.java:42)
at android.app.Activity.performCreate(Activity.java:5248)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1110)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2162)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2257)
at android.app.ActivityThread.access$800(ActivityThread.java:139)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5086)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
03-28 15:57:37.984 25855-25855/com.example.myapplication2.app I/Process: Sending signal. PID: 25855 SIG: 9
字符串
代码可以与java实现一起使用,但不能与android一起使用。是否有任何方法可以使用Gradle依赖项来避免此类错误。
1条答案
按热度按时间wbgh16ku1#
要在Android中使用Lucene,您可以:
字符串
型