【错误记录】Android NDK 错误排查记录 ( Could not get version from cmake.dir path ‘xxx\cmake\3.6.4111459‘. )
生活随笔
收集整理的這篇文章主要介紹了
【错误记录】Android NDK 错误排查记录 ( Could not get version from cmake.dir path ‘xxx\cmake\3.6.4111459‘. )
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
文章目錄
- 一、 報錯信息
- 二、 問題分析
- 三、 解決方案
一、 報錯信息
報錯信息 :
Executing tasks: [:app:assembleDebug] in project D:\002_Project\xxxCould not get version from cmake.dir path 'xxx\Sdk\cmake\3.6.4111459'. Could not get version from cmake.dir path 'xxx\Sdk\cmake\3.6.4111459'. > Task :app:preBuild UP-TO-DATE > Task :app:preDebugBuild UP-TO-DATE > Task :app:compileDebugAidl NO-SOURCE > Task :app:compileDebugRenderscript NO-SOURCE > Task :app:generateDebugBuildConfig > Task :app:checkDebugAarMetadata > Task :app:generateDebugResValues > Task :app:generateDebugResources Could not get version from cmake.dir path 'xxx\Sdk\cmake\3.6.4111459'. Could not get version from cmake.dir path 'xxx\Sdk\cmake\3.6.4111459'. > Task :app:createDebugCompatibleScreenManifests > Task :app:extractDeepLinksDebug> Task :app:processDebugMainManifest [com.android.support:animated-vector-drawable:28.0.0] C:\Users\octop\.gradle\caches\transforms-2\files-2.1\06be3ac5cf1549324533186b1b8df594\animated-vector-drawable-28.0.0\AndroidManifest.xml Warning:Package name 'android.support.graphics.drawable' used in: com.android.support:animated-vector-drawable:28.0.0, com.android.support:support-vector-drawable:28.0.0.> Task :app:processDebugManifest > Task :app:mergeDebugResources> Task :app:generateJsonModelDebug FAILED Could not get version from cmake.dir path 'xxx\cmake\3.6.4111459'. Could not get version from cmake.dir path 'xxx\Sdk\cmake\3.6.4111459'. Could not get version from cmake.dir path 'xxx\Sdk\cmake\3.6.4111459'. Could not get version from cmake.dir path 'xxx\Sdk\cmake\3.6.4111459'.> Task :app:javaPreCompileDebug > Task :app:processDebugManifestForPackageFAILURE: Build failed with an exception.* What went wrong: Execution failed for task ':app:generateJsonModelDebug'. > xxx\CMakeLists.txt : C/C++ debug|arm64-v8a : Could not get version from cmake.dir path 'xxx\Sdk\cmake\3.6.4111459'.* 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.orgBUILD FAILED in 40s 11 actionable tasks: 11 executed二、 問題分析
CMake , NDK 相關錯誤 , 先去查看 SDK , NDK , JRE 版本 ;
點擊 菜單欄 / File / Project Structure 選項 , 查看彈出的對話框 ,
發現 NDK 選項為空 , 該選項只能通過工程下的 local.properties 配置文件進行配置 ;
查看 local.properties 配置文件 , 這里單獨配置了一個 CMake 路徑 ;
三、 解決方案
刪除 local.properties 配置文件中的除 SDK 之外的其它路徑 , 不需要手動配置 NDK 路徑 , 配置了 SDK 路徑后 , 編譯時 , 會自動生成 NDK 的路徑 ;
總結
以上是生活随笔為你收集整理的【错误记录】Android NDK 错误排查记录 ( Could not get version from cmake.dir path ‘xxx\cmake\3.6.4111459‘. )的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【鸿蒙 HarmonyOS】UI 布局
- 下一篇: 【鸿蒙 HarmonyOS】UI 布局