Fix generate apk fail

This commit is contained in:
Dhilan007 2014-11-27 16:10:52 +08:00
parent 4cda033a04
commit a92b1733f0
1 changed files with 5 additions and 4 deletions

View File

@ -35,7 +35,7 @@ def initBuildConstant(ndk_build_param, build_mode):
ndkVersionValue = int(filter(str.isdigit,ndkVersion))
if ndkVersionValue < 10 or cmp(ndkVersion,'r10c') < 0 :
print '''Please use NDK r10c above.
If you do not,your application may crash or freeze when using c++ 11 regular,BMFont and HttpClient.
If you do not,your application may crash or freeze on Android L(5.0) when use BMFont and HttpClient.
For More information:
https://github.com/cocos2d/cocos2d-x/issues/9114
https://github.com/cocos2d/cocos2d-x/issues/9138\n'''
@ -45,6 +45,9 @@ For More information:
except Exception:
print "Can not be determined your NDK version"
if toolchainVersion == '4.8':
print 'NDK_TOOLCHAIN_VERSION is 4.8,your application may crash on Androud when use c++ 11 regular\n'
current_dir = os.path.dirname(os.path.realpath(__file__))
cocos_root = os.path.join(current_dir, "..")
BUILD_CONSTANT.COCOS_ROOT = cocos_root
@ -75,13 +78,11 @@ def check_environment_variables_sdk():
'''
try:
SDK_ROOT = os.environ['ANDROID_SDK_ROOT']
BUILD_CONSTANT.SDK_ROOT = os.environ['ANDROID_SDK_ROOT']
except Exception:
print "ANDROID_SDK_ROOT not defined. Please define ANDROID_SDK_ROOT in your environment"
sys.exit(1)
return SDK_ROOT
def caculate_built_samples(args):
''' Compute the sampels to be built
'cpp' for short of all cpp tests