Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行android demo报错 #110

Open
gfhjjk opened this issue Nov 21, 2022 · 16 comments
Open

运行android demo报错 #110

gfhjjk opened this issue Nov 21, 2022 · 16 comments
Assignees

Comments

@gfhjjk
Copy link

gfhjjk commented Nov 21, 2022

图片
图片

@robin1001
Copy link
Contributor

@pengzhendong 有空跟进一下吗?

@pengzhendong
Copy link
Member

请问模型是怎么准备的呢?

@gfhjjk
Copy link
Author

gfhjjk commented Nov 21, 2022

您好,就是单纯试用一下android的demo,但是运行的时候报这个错
图片

@pengzhendong
Copy link
Member

implementation 'com.microsoft.onnxruntime:onnxruntime-mobile:latest.release'
extractForNativeBuild 'com.microsoft.onnxruntime:onnxruntime-mobile:latest.release'

将 onnxruntime 的版本改成 1.12.0 试试

@gfhjjk
Copy link
Author

gfhjjk commented Nov 21, 2022

图片
是这样修改吗,还是报错了

@pengzhendong
Copy link
Member

你的模型是怎么导出的?

@gfhjjk
Copy link
Author

gfhjjk commented Nov 22, 2022

我用的就是下载下来项目里面默认的模型

@pengzhendong
Copy link
Member

图片 是这样修改吗,还是报错了

需要清空缓存

@theta666
Copy link

theta666 commented Dec 14, 2022

您好,我用android studio运行master代码的时候,报错找不到 include “onnxruntime_cxx_api.h”, 需要在build的时候设置一些额外的变量吗? @pengzhendong
wekws/runtime/core/kws/keyword_spotting.h:23:10: fatal error: 'onnxruntime_cxx_api.h' file not found

@pengzhendong
Copy link
Member

您好,我用android studio运行master代码的时候,报错找不到 include “onnxruntime_cxx_api.h”, 需要在build的时候设置一些额外的变量吗? @pengzhendong wekws/runtime/core/kws/keyword_spotting.h:23:10: fatal error: 'onnxruntime_cxx_api.h' file not found

应该就是网络问题,没有下载下来

@diki330
Copy link

diki330 commented Feb 9, 2023

请问fatal error: 'onnxruntime_cxx_api.h' file not found解决了么?

您好,我用android studio运行master代码的时候,报错找不到 include “onnxruntime_cxx_api.h”, 需要在build的时候设置一些额外的变量吗? @pengzhendong wekws/runtime/core/kws/keyword_spotting.h:23:10: fatal error: 'onnxruntime_cxx_api.h' file not found

@ToughmanL
Copy link

ToughmanL commented May 23, 2023

I solved “fatal error: 'onnxruntime_cxx_api.h' file not found” problem by downloading the library in onnxruntime official website.
image

But the loading error of ort model still bothers me. I have tried different versions of the onnxruntime dynamic library, and these libraries are consistent with the onnxruntime library on python, but this problem still exists.

@xinglan-d
Copy link

xinglan-d commented May 24, 2023

安卓端不能运行的问题我通过执行啦一下build.gradle中的task extractAARForNativeBuild任务解决啦,我不太清楚原理,但是可以尝试看看是否能解决;

我的系统是macos13
Android Studio版本是2022.2.1 Patch 1

@mayukawaiiyo
Copy link

I solved “fatal error: 'onnxruntime_cxx_api.h' file not found” problem by downloading the library in onnxruntime official website. image

But the loading error of ort model still bothers me. I have tried different versions of the onnxruntime dynamic library, and these libraries are consistent with the onnxruntime library on python, but this problem still exists.

Have you solved the problem? What was the last version of the onnx-runtime mobile used?

@BaeBae33
Copy link

BaeBae33 commented Dec 4, 2023

image can solve this problem

@feixu22
Copy link

feixu22 commented Aug 4, 2024

这个问题解决了么
微信图片_20240804191650

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants