更新org.tensorflow:tensorflow-lite-metadata
,org.tensorflow:tensorflow-lite-task-vision
和org.tensorflow:tensorflow-lite-support
后应用程序出错:
java.lang.NoSuchMethodError: No static method create(Ljava/nio/ByteBuffer;Lorg/tensorflow/lite/InterpreterApi$Options;)Lorg/tensorflow/lite/InterpreterApi; in class Lorg/tensorflow/lite/InterpreterApi; or its super classes (declaration of 'org.tensorflow.lite.InterpreterApi' appears in /data/app/~~iBlhCFEsffVRgKI8jlh50w==/com.po4yka.dancer.debug-dw8TLYwUobxDEHmwOF5CSg==/base.apk!classes2.dex)
怎么了?我在变更日志中找不到任何重大变更。
如果你正在使用Android Studio ML Binding,它还没有升级到tflite-support
0.4。您应该继续使用tflite-support
0.3.1。
见:https://github.com/tensorflow/tflite-support/issues/824