安卓原生打包报错

  • Creator 版本:3.6.2

  • 目标平台:Android

  • 重现方式:
    1、电脑环境(win10系统、处理器i71200H)
    2、creator3.6.2构建后的项目,使用AndroidStudio 2021.3.1 版本打包apk时报错。
    3、必现

  • 首个报错:
    F:\local\creator3d\native\engine\android\CMakeLists.txt : C/C++ debug|arm64-v8a : CMake Error at E:/Users/Administrator/AppData/Local/Android/Sdk/cmake/3.10.2.4988404/share/cmake-3.10/Modules/CMakeTestCXXCompiler.cmake:45 (message):
    The C++ compiler

“E:/Users/Administrator/AppData/Local/Android/Sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe”

is not able to compile a simple test program.

It fails with the following output:

Change Dir: F:/local/creator3d/build/android/proj/build/cmake/debug/arm64-v8a/CMakeFiles/CMakeTmp

Run Build Command:"E:\Users\Administrator\AppData\Local\Android\Sdk\cmake\3.10.2.4988404\bin\ninja.exe" "cmTC_42213"
ninja: fatal: couldn't open nul

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:4 (project)

F:\local\creator3d\native\engine\android\CMakeLists.txt : C/C++ debug|arm64-v8a : Configuration failed.
executing external native build for cmake F:\local\creator3d\native\engine\android\CMakeLists.txt

  • 编辑器操作系统: win10
  • 重现概率:必现

求大神教育

有大神看下吗 :face_with_monocle:

我刚刚也用这个 3.6.2 打包。windows11 。 cmake 找不到。

ndk 版本再降下看看,cmake 是有装是吗?

cmake有装的,ndk版本降了还是不行。很奇怪,同样的环境配置,换了台电脑就不行。

操作了一番后,现在报如下错误:
Could not resolve all dependencies for configuration ‘:creator3d:debugRuntimeClasspath’.
Could not create task ‘:creator3d:minifyReleaseWithR8’.
Cannot query the value of this provider because it has no value available.

系统问题,换了个系统就可以了

挖个坟,我也踩这个坑里了,其实是win10的null.sys出了问题,从其他电脑上拷贝一份过来,然后
获取删除权限
takeown /f C:\Windows\System32\drivers\null.sys
icacls C:\Windows\System32\drivers\null.sys /grant administrators:F

删除null.sys 替换其他系统拷贝过来的文件

删除服务
sc delete null

启动服务
sc query null
sc start null

就好了

请问 为什么 我启动服务的时候,说服务未安装

[SC] EnumQueryServicesStatus:OpenService 失败 1060:
指定的服务未安装。