Post

반응형
FAILURE: Build failed with an exception. 

* What went wrong: 
A problem occurred configuring project ':test4'. 
> NDK not configured. C:\Users\user\AppData\Local\Android\Sdk\ndk\26.2.11394342 
  Download it with SDK manager. 

* Try: 
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights. 

* Get more help at https://help.gradle.org

BUILD FAILED in 31s 
Error running command, return code: 1.

저번에 ndk 버전이 높아서 낮췄다고 했는데

NDK not configured. C:\Users\user\AppData\Local\Android\Sdk\ndk\26.2.11394342
반응형

해당 위치에 NDK가 존재하지 않아서 나는 에러였다.

NDK 높은게 좋지않나...생각이 드는데... 또 어디에 보면 너무 높으면 뭐가 안된다는 말도있고;;;

하아 고민이다.

아무튼 일단 되는 걸 목표로 다른사람들이 갔던길을 가기로하자...(최신 NDK때문에 에러나면 물어볼 곳도 없다...)

사용자 변수에서 NDK 값 추가한 것 발견

NDK_ROOT : C:\Users\user\AppData\Local\Android\Sdk\ndk\26.2.11394342

이걸 현재 NDK 값 C:\Users\user\AppData\Local\Android\Sdk\ndk\android-ndk-r16b 으로 수정했다.

그리고 다시 APK 생성 시도

cocos compile test4 -p android

그리고 또 에러 발생

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':test4'.
> Invalid revision: 3.22.1-g37088a8-dirty

* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 16s
VCS Checkout Cache (H:\CocosProject\test4\proj.android\.gradle\vcsWorkingDirs) has not been cleaned up in 0 days
Error running command, return code: 1.
H:\CocosProject\test4\proj.android>

Invalid revision: 3.22.1-g37088a8-dirty 로 검색하니 cmake버전이 높아서 2 로 낮춰야 한다고도 한다(들은적 있는 소리긴 함...)

현재 cmake 버전

H:\CocosProject\test4\proj.android>cmake -version
cmake version 3.28.3

https://blog.csdn.net/liuqinhou/article/details/126273005

https://stackoverflow.com/questions/66540676/invalid-revision-3-18-1-cmake-in-android-studio

 

Invalid revision: 3.18.1 CMake in Android Studio

This is not a question, it is a solution for a technical problem with android studio which I have meet. I will share my doing to fix the error if any one would encounter. The brief error message is: &

stackoverflow.com

위 해결책을 보고 CMake를 추가적으로 설치했다.

(대략 Setting for Now Project를 켜서 SDK Tools에서 Show Pakage Details를 체크하여 cmake 버전 3.6.411459을 설치한다. 체크또한 낮춘 버전(3.6~)에만 체크시킨다.

그리고 build.gradle로 가서 cmake 버전을 추가해준다

    externalNativeBuild {
         cmake {
            version "3.6.4111459"
        }

    }

그리고 local.properties에 cmake경로 추가

cmake.dir=C\:\\Users\\user\\AppData\\Local\\Android\\Sdk\\cmake\\3.22.1

마지막에 cmake 버전 체크를 낮은걸로만 해주니까 성공했다.

하지만 또 다른 에러가 발발했다ㅠㅠㅋㅋㅋㅋㅋ

(근데 다음 포스팅에서 apk 빌드 성공함 ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ)

https://dramadramingdays.tistory.com/398

 

cocos2d-x apk 빌드 Failed to read key AndroidDebugKey from store 에러

이전 포스팅에 이어서 또 새로운 에러 발발... 에러를 고치면? 새로운 에러가 나타나지. 짤빵생각나ㅠㅠㅋㅋㅋㅋㅋㅋㅋ > Task :test4:packageDebug FAILED Task ':test4:packageDebug' is not up-to-date because: No histor

dramadramingdays.tistory.com

 

반응형
▲ top