3.4 android 编译求助

一个demo,在win7下用vs调过了。现在想打包到android平台。

1,在proj.android下执行 python build_native.py
F:\develop\cocos2dx\cocos2d-x-3.4\project\cashdemo\proj.android>python build_nat
ive.py
We will remove this script next version,you should use cocos console to build an
droid project.

The Selected NDK toolchain version was 4.8 !
Android NDK: Trying to define local module ‘cocos2dx_static’ in F:/develop/andro
idNDK/android-ndk-r9/sources/cocos2dx/Android.mk.
Android NDK: But this module was already defined by jni/…/…/cocos2d/cocos/./An
droid.mk.
make: Entering directory F:/develop/cocos2dx/cocos2d-x-3.4/project/cashdemo/pro j.android' F:/develop/androidNDK/android-ndk-r9/build/core/build-module.mk:34: *** Android NDK: Aborting. . Stop. make: Leaving directory F:/develop/cocos2dx/cocos2d-x-3.4/project/cashdemo/proj
.android’
Traceback (most recent call last):
File “build_native.py”, line 149, in
build(opts.ndk_build_param,opts.android_platform,opts.build_mode)
File “build_native.py”, line 134, in build
do_build(cocos_root, ndk_root, app_android_root,ndk_build_param,sdk_root,and
roid_platform,build_mode)
File “build_native.py”, line 70, in do_build
raise Exception(“Build dynamic library for project " + app_android_root +
" ] fails!”)
Exception: Build dynamic library for project F:\develop\cocos2dx\cocos2d-x-3.4
\project\cashdemo\proj.android ] fails!

2,在项目根目录执行 cocos compile -p android

jni/…/…/Classes/GameMain.cpp:671:49: error: ‘CC_CALLFUNCN_SELECTOR’ was not de
clared in this scope
CallFuncN * callF = CallFuncN::create(this, CC_CALLFUNCN_SELECTOR(GameMain:
:removeTTF,numsTTF));
^
At global scope:
cc1plus.exe: warning: unrecognized command line option “-Wno-extern-c-compat” [e
nabled by default]
cc1plus.exe: warning: unrecognized command line option “-Wno-extern-c-compat” [e
nabled by default]
make: *** [obj/local/armeabi/objs-debug/cocos2dcpp_shared///Classes/GameMain
.o] Error 1
make: *** Waiting for unfinished jobs…
"Compile++ thumb : cocostudio_static <= CCBone.cpp
"Compile++ thumb : cocostudio_static <= CCArmatureAnimation.cpp
make: Leaving directory `F:/develop/cocos2dx/cocos2d-x-3.4/project/cashdemo/proj
.android’
Ndk build failed!

请大侠们赐教,如何解决这些问题

在方法2中报error的那个文件中,我引入头文件
#include “base/CCRef.h”
error依然存在,继续求大侠帮助:6:

新的进展。
仔细检查了代码,发现是代码有问题,
CallFuncN * callF = CallFuncN::create(this, CC_CALLFUNCN_SELECTOR(GameMain::removeTTF,numsTTF));
应该为
CallFuncN * callF = CallFuncN::create(this, CC_CALLFUNCN_SELECTOR(GameMain::removeTTF));
或者
CallFuncN * callF = CallFuncN::create(CC_CALLBACK_1(GameMain::removeTTF,this));
目前执行cocos compile -p android,至少在编译了,虽然不知道结果如何

刚才编译到最后提示ant路径设置不对,失败。
重新设置路径后,编译,出现如下错误,继续研究。。。
有熟悉的大侠,也请帮忙指点啊:6:
-code-gen:
Merging AndroidManifest files into one.
Manifest merger disabled. Using project manifest only.
Handling aidl files…
No AIDL files to compile.
----------
Handling RenderScript files…
----------
Handling Resources…
Generating resource IDs…
----------
Handling BuildConfig class…
Generating BuildConfig class.

-pre-compile:

-compile:
Compiling 25 source files to F:\develop\cocos2dx\cocos2d-x-3.4\proje
ct\cashdemo\cocos2d\cocos\platform\android\java\bin\classes
F:\develop\cocos2dx\cocos2d-x-3.4\project\cashdemo\cocos2d\cocos\pla
tform\android\java\src\org\cocos2dx\lib\Cocos2dxWebView.java:6: error: package a
ndroid.annotation does not exist
import android.annotation.SuppressLint;
^
F:\develop\cocos2dx\cocos2d-x-3.4\project\cashdemo\cocos2d\cocos\pla
tform\android\java\src\org\cocos2dx\lib\Cocos2dxWebView.java:25: error: cannot f
ind symbol
@SuppressLint(“SetJavaScriptEnabled”)
^
symbol: class SuppressLint
location: class Cocos2dxWebView
2 errors

BUILD FAILED
F:\android_sdk\tools\ant\build.xml:601: The following error occurred while execu
ting this line:
F:\android_sdk\tools\ant\build.xml:720: The following error occurred while execu
ting this line:
F:\android_sdk\tools\ant\build.xml:734: Compile failed; see the compiler error o
utput for details.

Total time: 30 seconds
Error running command, return code: 1

奇怪,回家换了台电脑就编过了,没有android.annotation相关的错误,两台电脑的ANDROID SDK是一样的,只是现在这台是64bit的,JDK和之前那台略有不同而已。

PS:另一个问题,这样编出来的是debug,unsigned的apk,如果要做release的,signed的APK,还是要用eclipse,是么?