Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17103

OSX Android NDK uses wrong Toolchain Version due to missing release file

$
0
0

@lyinch wrote:

Hello, when I create a new cocos2d-x project and run the ./build_native.py in the android folder, I get the following output:

Please use cocos console instead.

Building mode: debug
Using Eclipse project : /Users/thierrybackes/Desktop/Test_Game_2/test_game_2/proj.android
Android platform not specified, searching a default one...
running: '/Users/thierrybackes/Library/Android/sdk/tools/android update project -t android-23 -p /Users/thierrybackes/Desktop/Test_Game_2/test_game_2/proj.android'

Updated project.properties
Updated local.properties
Updated file /Users/thierrybackes/Desktop/Test_Game_2/test_game_2/proj.android/proguard-project.txt
Android platform not specified, searching a default one...
running: '/Users/thierrybackes/Library/Android/sdk/tools/android update lib-project -p /Users/thierrybackes/Desktop/Test_Game_2/test_game_2/cocos2d/cocos/platform/android/java -t android-23'

Updated project.properties
Updated local.properties
Updated file /Users/thierrybackes/Desktop/Test_Game_2/test_game_2/cocos2d/cocos/platform/android/java/proguard-project.txt
Building native...
NDK build mode: debug
Parse NDK version from file /Users/thierrybackes/Library/Android/android-ndk-r11c/RELEASE.TXT failed.
NDK_TOOLCHAIN_VERSION: 4.8
running: '/Users/thierrybackes/Library/Android/android-ndk-r11c/ndk-build -C /Users/thierrybackes/Desktop/Test_Game_2/test_game_2/proj.android -j4 NDK_MODULE_PATH=/Users/thierrybackes/Desktop/Test_Game_2/test_game_2/proj.android/../cocos2d:/Users/thierrybackes/Desktop/Test_Game_2/test_game_2/proj.android/../cocos2d/cocos:/Users/thierrybackes/Desktop/Test_Game_2/test_game_2/proj.android/../cocos2d/external NDK_TOOLCHAIN_VERSION=4.8 NDK_DEBUG=1'

Android NDK: WARNING: APP_PLATFORM android-23 is larger than android:minSdkVersion 9 in ./AndroidManifest.xml    
[armeabi] Compile++      : cocos2dcpp_shared <= main.cpp
[armeabi] Compile++      : cocos2dcpp_shared <= AppDelegate.cpp
make: /Users/thierrybackes/Library/Android/android-ndk-r11c/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++: No such file or directory
make: /Users/thierrybackes/Library/Android/android-ndk-r11c/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++: No such file or directory
[armeabi] Compile++      : cocos2dcpp_shared <= HelloWorldScene.cpp
make: /Users/thierrybackes/Library/Android/android-ndk-r11c/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++: No such file or directory
make: *** [obj/local/armeabi/objs-debug/cocos2dcpp_shared/__/__/Classes/AppDelegate.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [obj/local/armeabi/objs-debug/cocos2dcpp_shared/__/__/Classes/HelloWorldScene.o] Error 1
make: *** [obj/local/armeabi/objs-debug/cocos2dcpp_shared/hellocpp/main.o] Error 1
Error running command, return code: 2.
Traceback (most recent call last):
  File "./build_native.py", line 43, in <module>
    build(opts.build_mode)
  File "./build_native.py", line 28, in build
    raise Exception("Build dynamic library for project [ " + app_android_root + " ] fails!")
Exception: Build dynamic library for project [ /Users/thierrybackes/Desktop/Test_Game_2/test_game_2/proj.android/../ ] fails!

The problem is in my opinion here:

    Parse NDK version from file /Users/thierrybackes/Library/Android/android-ndk-r11c/RELEASE.TXT failed.
NDK_TOOLCHAIN_VERSION: 4.8

I use the r11c version, which has ndk toolchain version 4.9, and no RELEASE.TXT :

 /Users/thierrybackes/Library/Android/android-ndk-r11c/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++: No such file or directory

By adding a RELEASE.TXT with the ndk version: r11c (64 bit)
I can properly build the natives.
I'm fairly new to Cocos2d-x, so I'm not sure where I should post this, but I think that this is a problem in the native cocos building scripts, when cocos looks for the RELEASE file and Android has removed them (at least for r11c on osx).
I don't know if I'm the only one with those kind of problems, if cocos works differently on other platforms and if the Android NDK version is different on other platforms as well...

Posts: 5

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 17103

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>