英文:
A problem occurred evaluating project ':tflite'. I am using Tflite in My Flutter Project its Throw an error
问题
I am using Tflite in My Flutter app but this throws an error.
我在我的Flutter应用中使用Tflite,但出现错误。
I am trying to implement Tensor Flow in my project and during the build time in android its not working.
我正在尝试在我的项目中实现Tensor Flow,在Android构建时它不起作用。
How can I resolve this?
我该如何解决这个问题?
英文:
I am using Tflite in My Flutter app but this throws an error
I am trying to implement Tensor Flow in my project and during the build time in android its not working.
FAILURE: Build failed with an exception.
* Where:
Build file 'E:\flutter\.pub-cache\hosted\pub.dartlang.org\tflite-1.1.2\android\build.gradle' line: 24
* What went wrong:
A problem occurred evaluating project ':tflite'.
> No signature of method: build_cjzs76bmoa4s3xuisbd6iogry.android() is applicable for argument types: (build_cjzs76bmoa4s3xuisbd6iogry$_run_closure2) values: [build_cjzs76bmoa4s3xuisbd6iogry$_run_closure2@27fba1d4]
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 47s
Exception: Gradle task assembleDebug failed with exit code 1
How can I resolve this?
答案1
得分: 1
首先访问错误中显示的目录:E:\flutter.pub-cache\hosted\pub.dartlang.org\tflite-1.1.2\android\build.gradle
然后将末尾的依赖项更改为:
dependencies {
implementation 'org.tensorflow:tensorflow-lite:+'
implementation 'org.tensorflow:tensorflow-lite-gpu:+'
}
保存。如果仍然无法解决,请尝试将minSDK版本更改为19。这应该解决您的问题
英文:
First visit this directory that is shown in the error
E:\flutter.pub-cache\hosted\pub.dartlang.org\tflite-1.1.2\android\build.gradle
There change the dependencies at the end to
dependencies {
implementation 'org.tensorflow:tensorflow-lite:+'
implementation 'org.tensorflow:tensorflow-lite-gpu:+'
}
and save.If still it doesn't work try to change your minSDK version to 19. This should fix your problem
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论