java.lang.RuntimeException: 无法启动 activity ComponentInfo(tensorflow.lite.examples)

java.lang.RuntimeException: Unable to start activity ComponentInfo(tensorflow.lite.examples)

我正在从事这个项目:TensorFlow Lite 图像分类 Android 示例应用程序

GitHub link: https://github.com/tensorflow/examples/tree/master/lite/examples/image_classification/android

我 运行 这个项目是我自己 phone (xiaomi redmi note 8) Android Studio(不是模拟器)

当我在 Android Studio 上 运行 这个项目时,TFL Classify 应用程序出现以下错误:应用程序不断停止。

然后 Android Studio 给出了这个错误:


E/AndroidRuntime: FATAL EXCEPTION: main
    Process: org.tensorflow.lite.examples.classification, PID: 20798
    java.lang.RuntimeException: Unable to start activity ComponentInfo{org.tensorflow.lite.examples.classification/org.tensorflow.lite.examples.classification.ClassifierActivity}: java.lang.IllegalArgumentException: No enum constant org.tensorflow.lite.examples.classification.tflite.Classifier.Model.QUANTİZED_EFFİCİENTNET
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2984)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3119)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1839)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:201)
        at android.app.ActivityThread.main(ActivityThread.java:6864)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
     Caused by: java.lang.IllegalArgumentException: No enum constant org.tensorflow.lite.examples.classification.tflite.Classifier.Model.QUANTİZED_EFFİCİENTNET
        at java.lang.Enum.valueOf(Enum.java:258)
        at org.tensorflow.lite.examples.classification.tflite.Classifier$Model.valueOf(Classifier.java:47)
        at org.tensorflow.lite.examples.classification.CameraActivity.onCreate(CameraActivity.java:195)
        at android.app.Activity.performCreate(Activity.java:7232)
        at android.app.Activity.performCreate(Activity.java:7221)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1272)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2964)

我将 SDK 版本 28 更新到 29.0.2,但没有用

从字符串 QUANTİZED_EFFİCİENTNET 中删除重音 - 它应该是 QUANTIZED_EFFICIENTNET 以便它匹配相应的枚举标签。