Why do I get execution failed for task ':app:buildNdkBuildDebug[armeabi-v7a]' when I run whisper project in real mobile phone?

huangapple go评论56阅读模式
英文:

Why do I get execution failed for task ':app:buildNdkBuildDebug[armeabi-v7a]' when I run whisper project in real mobile phone?

问题

我能够在Android Studio模拟器上运行项目https://github.com/ggerganov/whisper.cpp/tree/master/examples/whisper.android(Pixel XL API 13,您可以看到图像A),没有任何问题。

但是,当我在真实移动电话上运行项目时,我会遇到以下错误,为什么?

执行任务':app:buildNdkBuildDebug [armeabi-v7a]'失败。

com.android.ide.common.process.ProcessException: make:无需执行'耳语'。

尝试:

使用--info或--debug选项运行以获取更多日志输出。
使用--scan运行以获取完整的见解。

异常是:
org.gradle.api.tasks.TaskExecutionException:执行任务':app:buildNdkBuildDebug [armeabi-v7a]'失败。

英文:

I'm able to run the project https://github.com/ggerganov/whisper.cpp/tree/master/examples/whisper.android on Android Studio emulator (Pixel XL API 13, you can see the Image A) without any issues.

But I get the following error when I run the project in real mobile phone, I get the following error, why?

Execution failed for task ':app:buildNdkBuildDebug[armeabi-v7a]'.
> com.android.ide.common.process.ProcessException: make: Nothing to be done for 'whisper'.
  [armeabi-v7a] Compile thumb  : whisper_vfpv4 <= ggml.c

* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:buildNdkBuildDebug[armeabi-v7a]'.
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:147)
	at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:282)
	...
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
Caused by: org.gradle.internal.UncheckedException: com.android.ide.common.process.ProcessException: make: Nothing to be done for 'whisper'.
[armeabi-v7a] Compile thumb  : whisper_vfpv4 <= ggml.c

C++ build system [build] failed while executing:
    @echo off
    "C:\\Android_SDK\\ndk\.1.8937393\\ndk-build.cmd" ^
      "NDK_PROJECT_PATH=null" ^
      "APP_BUILD_SCRIPT=E:\\Android_Studio_Sample\\Whisper\\examples\\whisper.android\\app\\src\\main\\jni\\whisper\\Android.mk" ^
      "NDK_APPLICATION_MK=E:\\Android_Studio_Sample\\Whisper\\examples\\whisper.android\\app\\src\\main\\jni\\whisper\\Application.mk" ^
      "APP_ABI=armeabi-v7a" ^
      "NDK_ALL_ABIS=armeabi-v7a" ^
      "NDK_DEBUG=1" ^
      "APP_PLATFORM=android-26" ^
      "NDK_OUT=E:\\Android_Studio_Sample\\Whisper\\examples\\whisper.android\\app\\build\\intermediates\\cxx\\Debug\u1e1z2/obj" ^
      "NDK_LIBS_OUT=E:\\Android_Studio_Sample\\Whisper\\examples\\whisper.android\\app\\build\\intermediates\\cxx\\Debug\u1e1z2/lib" ^
      whisper ^
      whisper_vfpv4
  from E:\Android_Studio_Sample\Whisper\examples\whisper.android\app
error: unable to open output file 'E:\Android_Studio_Sample\Whisper\examples\whisper.android\app\build\intermediates\cxx\Debugu1e1z2/obj/local/armeabi-v7a/objs-debug/whisper_vfpv4/E_/Android_Studio_Sample/Whisper/examples/whisper.android/app/src/main/jni/whisper/__/__/__/__/__/__/__//ggml.o': 'No such file or directory'
1 error generated.
make: *** [C:/Android_SDK/ndk/25.1.8937393/build/../build/core/build-binary.mk:422: E:\Android_Studio_Sample\Whisper\examples\whisper.android\app\build\intermediates\cxx\Debugu1e1z2/obj/local/armeabi-v7a/objs-debug/whisper_vfpv4/E_/Android_Studio_Sample/Whisper/examples/whisper.android/app/src/main/jni/whisper/__/__/__/__/__/__/__//ggml.o] Error 1

	at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:68)
	at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:41)

Image A
Why do I get execution failed for task ':app:buildNdkBuildDebug[armeabi-v7a]' when I run whisper project in real mobile phone?

答案1

得分: 1

错误消息显示在使用Android NDK构建本地C++代码时出现问题。构建系统表示无需重新构建,但在为armeabi-v7a架构编译时发现错误。这可能是由于文件权限或路径问题引起的。要修复它,您可以尝试清理项目,然后从头开始重新构建。在Android Studio中有一个“Build”菜单,点击“Clean Project”,然后尝试重新构建项目,看看是否有效。您可能需要考虑将Android NDK更新到最新版本。

英文:

The error message shows that there's a problem while building the native C++ code using Android NDK. The build sys says that there's no need to rebuild it, but found an error when compiling for the armeabi-v7a arch.
This may be due to file permissions or path issues. To fix it, you can try to clean the project and rebuild it from scratch. There's a "Build" menu on Android Studio, click on "Clean Project" then try rebuilding the project to see if it works.
You may consider updating Android NDK to the lasted version.

huangapple
  • 本文由 发表于 2023年4月20日 09:34:35
  • 转载请务必保留本文链接:https://go.coder-hub.com/76059928.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定