-
Notifications
You must be signed in to change notification settings - Fork 6
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
构建报错 #7
Comments
C:\Users\wangke\AppData\Local\Android\Sdk\ndk\android-ndk-r21e-windows-x86_64\android-ndk-r21e 这个路径不是我电脑上的啊 |
你修改到你的路径,或者直接删除就好了
…---- 回复的原邮件 ----
| 发件人 | ***@***.***> |
| 日期 | 2024年12月08日 19:58 |
| 收件人 | ***@***.***> |
| 抄送至 | ***@***.***> |
| 主题 | Re: [eecn/ncnn-android-yolov8-pose] 构建报错 (Issue #7) |
C:\Users\wangke\AppData\Local\Android\Sdk\ndk\android-ndk-r21e-windows-x86_64\android-ndk-r21e 这个路径不是我电脑上的啊
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
project(yolov8ncnn) cmake_minimum_required(VERSION 3.10) opencv4 requires c++11set(CMAKE_CXX_STANDARD 11) set(OpenCV_DIR ${CMAKE_SOURCE_DIR}/opencv-mobile-2.4.13.7-android/sdk/native/jni) set(ncnn_DIR ${CMAKE_SOURCE_DIR}/ncnn-20240820-android-vulkan/${ANDROID_ABI}/lib/cmake/ncnn) add_library(yolov8ncnn SHARED yolov8ncnn.cpp yolov8.cpp ndkcamera.cpp yolov8pose.cpp) target_link_libraries(yolov8ncnn ncnn ${OpenCV_LIBS} camera2ndk mediandk) |
sdk路径已经改了呀 |
local.properties 文件修改自己的sdk路径吗 |
This file must NOT be checked into Version Control Systems,as it contains information specific to your local configuration.Location of the SDK. This is only used by Gradle.For customization when using a Version Control System, please read theheader note.#Sun Dec 08 19:16:28 CST 2024 Invalid revision: 3.22.1-g37088a8-dirty Affected Modules: app |
这个错误应该是cmake版本的问题 |
C++ build system [build] failed while executing: C++ build system [build] failed while executing: |
我调试的设备是安卓9.0 |
Suppressed sync exceptions
Location specified by ndk.dir (C:\Users\wangke\AppData\Local\Android\Sdk\ndk\android-ndk-r21e-windows-x86_64\android-ndk-r21e) did not contain a valid NDK and and couldn't be used
org.gradle.api.GradleException: Location specified by ndk.dir (C:\Users\wangke\AppData\Local\Android\Sdk\ndk\android-ndk-r21e-windows-x86_64\android-ndk-r21e) did not contain a valid NDK and and couldn't be used
at com.android.build.gradle.internal.cxx.logging.ErrorsAreFatalThreadLoggingEnvironment.close(ErrorsAreFatalThreadLoggingEnvironment.kt:50)
at kotlin.jdk7.AutoCloseableKt.closeFinally(AutoCloseable.kt:61)
at com.android.build.gradle.internal.cxx.configure.NdkLocatorKt.findNdkPathWithRecord(NdkLocator.kt:318)
at com.android.build.gradle.internal.cxx.configure.NdkLocatorKt.findNdkPath(NdkLocator.kt:405)
at com.android.build.gradle.internal.ndk.NdkHandler.findNdk(NdkHandler.kt:102)
at com.android.build.gradle.internal.ndk.NdkHandler.getNdkStatus(NdkHandler.kt:121)
at com.android.build.gradle.internal.ndk.NdkHandler.getNdkPlatform(NdkHandler.kt:149)
at com.android.build.gradle.internal.cxx.model.TryCreateCxxModuleModelKt$tryCreateCxxModuleModel$4$ndkHandler$2.invoke(TryCreateCxxModuleModel.kt:100)
at com.android.build.gradle.internal.cxx.model.TryCreateCxxModuleModelKt$tryCreateCxxModuleModel$4$ndkHandler$2.invoke(TryCreateCxxModuleModel.kt:95)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at com.android.build.gradle.internal.cxx.model.TryCreateCxxModuleModelKt$tryCreateCxxModuleModel$4.getNdkHandler(TryCreateCxxModuleModel.kt)
at com.android.build.gradle.internal.cxx.model.TryCreateCxxModuleModelKt$tryCreateCxxModuleModel$4.access$getNdkHandler$p(TryCreateCxxModuleModel.kt:95)
at com.android.build.gradle.internal.cxx.model.TryCreateCxxModuleModelKt$tryCreateCxxModuleModel$4$ndkSupportedAbiList$2.invoke(TryCreateCxxModuleModel.kt:161)
at com.android.build.gradle.internal.cxx.model.TryCreateCxxModuleModelKt$tryCreateCxxModuleModel$4$ndkSupportedAbiList$2.invoke(TryCreateCxxModuleModel.kt:95)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at com.android.build.gradle.internal.cxx.model.TryCreateCxxModuleModelKt$tryCreateCxxModuleModel$4.getNdkSupportedAbiList(TryCreateCxxModuleModel.kt)
at com.android.build.gradle.internal.cxx.model.CreateCxxVariantModelKt$createCxxVariantModel$1$validAbiList$2.invoke(CreateCxxVariantModel.kt:57)
at com.android.build.gradle.internal.cxx.model.CreateCxxVariantModelKt$createCxxVariantModel$1$validAbiList$2.invoke(CreateCxxVariantModel.kt:31)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at com.android.build.gradle.internal.cxx.model.CreateCxxVariantModelKt$createCxxVariantModel$1.getValidAbiList(CreateCxxVariantModel.kt)
at com.android.build.gradle.tasks.ExternalNativeJsonGenerator.createImpl(ExternalNativeJsonGenerator.java:433)
at com.android.build.gradle.tasks.ExternalNativeJsonGenerator.create(ExternalNativeJsonGenerator.java:423)
at com.android.build.gradle.internal.TaskManager.lambda$createExternalNativeBuildJsonGenerators$15(TaskManager.java:1431)
at com.google.common.base.Suppliers$NonSerializableMemoizingSupplier.get(Suppliers.java:167)
at org.gradle.api.internal.provider.DefaultProvider.calculateOwnValue(DefaultProvider.java:66)
at org.gradle.api.internal.provider.AbstractMinimalProvider.get(AbstractMinimalProvider.java:84)
at com.android.build.gradle.internal.ide.NativeModelBuilder.getGenerators(NativeModelBuilder.kt:52)
at com.android.build.gradle.internal.ide.NativeModelBuilder.buildNativeAndroidProjectWithJustVariantInfos(NativeModelBuilder.kt:115)
at com.android.build.gradle.internal.ide.NativeModelBuilder.buildAll(NativeModelBuilder.kt:96)
at com.android.build.gradle.internal.ide.NativeModelBuilder.buildAll(NativeModelBuilder.kt:38)
at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$BuilderWithParameter.build(DefaultToolingModelBuilderRegistry.java:248)
at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$UserCodeAssigningBuilder.lambda$build$0(DefaultToolingModelBuilderRegistry.java:322)
at org.gradle.configuration.internal.DefaultUserCodeApplicationContext$CurrentApplication.reapply(DefaultUserCodeApplicationContext.java:109)
at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$UserCodeAssigningBuilder.build(DefaultToolingModelBuilderRegistry.java:322)
at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$LockSingleProjectBuilder.lambda$build$0(DefaultToolingModelBuilderRegistry.java:265)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$withProjectLock$3(DefaultProjectStateRegistry.java:385)
at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:211)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.withProjectLock(DefaultProjectStateRegistry.java:385)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.fromMutableState(DefaultProjectStateRegistry.java:366)
at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$LockSingleProjectBuilder.build(DefaultToolingModelBuilderRegistry.java:265)
at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$BuildOperationWrappingBuilder$1.call(DefaultToolingModelBuilderRegistry.java:300)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:79)
at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:79)
at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$BuildOperationWrappingBuilder.build(DefaultToolingModelBuilderRegistry.java:297)
at org.gradle.tooling.internal.provider.runner.DefaultBuildController.getParameterizedModel(DefaultBuildController.java:162)
at org.gradle.tooling.internal.provider.runner.DefaultBuildController.getModel(DefaultBuildController.java:110)
at org.gradle.tooling.internal.consumer.connection.ParameterAwareBuildControllerAdapter.getModel(ParameterAwareBuildControllerAdapter.java:39)
at org.gradle.tooling.internal.consumer.connection.UnparameterizedBuildController.getModel(UnparameterizedBuildController.java:113)
at org.gradle.tooling.internal.consumer.connection.NestedActionAwareBuildControllerAdapter.getModel(NestedActionAwareBuildControllerAdapter.java:31)
at com.android.tools.idea.gradle.project.sync.SyncActionRunnerKt$toMeasuringController$1$getModel$4.invoke(SyncActionRunner.kt:270)
at com.android.tools.idea.projectsystem.gradle.sync.Counter.invoke(PerformanceMeasurementUtil.kt:108)
at com.android.tools.idea.gradle.project.sync.SyncActionRunnerKt.measure(SyncActionRunner.kt:327)
at com.android.tools.idea.gradle.project.sync.SyncActionRunnerKt.access$measure(SyncActionRunner.kt:1)
at com.android.tools.idea.gradle.project.sync.SyncActionRunnerKt$toMeasuringController$1.getModel(SyncActionRunner.kt:270)
at com.android.tools.idea.gradle.project.sync.ActionToRun$toSafeController$1.getModel(SyncActionRunner.kt:140)
at com.android.tools.idea.gradle.project.sync.ModelFetchersKt.findParameterizedAndroidModel(ModelFetchers.kt:64)
at com.android.tools.idea.gradle.project.sync.BasicV1AndroidModuleGradleProject$getGradleModuleAction$1$1.invoke(BasicModules.kt:122)
at com.android.tools.idea.gradle.project.sync.BasicV1AndroidModuleGradleProject$getGradleModuleAction$1$1.invoke(BasicModules.kt:118)
at com.android.tools.idea.gradle.project.sync.ModelResult$Companion$mapCatching$1.invoke(ModelResult.kt:44)
at com.android.tools.idea.gradle.project.sync.ModelResult$Companion$mapCatching$1.invoke(ModelResult.kt:43)
at com.android.tools.idea.gradle.project.sync.ModelResult$Companion.create(ModelResult.kt:32)
at com.android.tools.idea.gradle.project.sync.ModelResult$Companion.mapCatching(ModelResult.kt:43)
at com.android.tools.idea.gradle.project.sync.BasicV1AndroidModuleGradleProject$getGradleModuleAction$1.invoke(BasicModules.kt:118)
at com.android.tools.idea.gradle.project.sync.BasicV1AndroidModuleGradleProject$getGradleModuleAction$1.invoke(BasicModules.kt:90)
at com.android.tools.idea.gradle.project.sync.ActionToRun.run$intellij_android_projectSystem_gradle_sync(SyncActionRunner.kt:77)
at com.android.tools.idea.gradle.project.sync.SyncActionRunner$runActions$executionResults$1$1.execute(SyncActionRunner.kt:231)
at org.gradle.tooling.internal.consumer.connection.NestedActionAwareBuildControllerAdapter$1.get(NestedActionAwareBuildControllerAdapter.java:51)
at org.gradle.tooling.internal.provider.runner.DefaultBuildController$NestedAction.run(DefaultBuildController.java:259)
at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$QueueWorker.execute(DefaultBuildOperationExecutor.java:220)
at org.gradle.internal.operations.DefaultBuildOperationQueue$WorkerRunnable.runOperation(DefaultBuildOperationQueue.java:243)
at org.gradle.internal.operations.DefaultBuildOperationQueue$WorkerRunnable.doRunBatch(DefaultBuildOperationQueue.java:224)
at org.gradle.internal.operations.DefaultBuildOperationQueue$WorkerRunnable.lambda$runBatch$1(DefaultBuildOperationQueue.java:202)
at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:211)
at org.gradle.internal.operations.DefaultBuildOperationQueue$WorkerRunnable.runBatch(DefaultBuildOperationQueue.java:200)
at org.gradle.internal.operations.DefaultBuildOperationQueue$WorkerRunnable.run(DefaultBuildOperationQueue.java:172)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:61)
at java.base/java.lang.Thread.run(Thread.java:840)
Affected Modules: app
The text was updated successfully, but these errors were encountered: