Saturday, August 2, 2014

cocos2d-x 3.0 c++ compile error and fixed develop log

 


> cocos new Snake -p com.pkrss.snake -l cpp -d Project

// need many timers.
> cocos compile -p android -m release --ap 10

 

error: Couldn't find the gcc toolchain.
log:
ndk-r10 is not support cocos2d-x 3.2,and release ndk-r9

error:
Android NDK: Invalid APP_STL value: c++_static
log:
edit project dir\proj.android\jni\Application.mk
old:
APP_STL := c++_static
new:
APP_STL := gnustl_static

error:
"Compile thumb : chipmunk_static <= cpCollision.c
C:/Users/deliang/AppData/Local/Temp/cpCollision-276362.s: Assembler messages:
C:/Users/Administrator/AppData/Local/Temp/cpCollision-334565.s:2151: Error: cannot honor width suffix -- `ldr r4,[r1],#4'
log:
used ndk-r9d,not used ndk-r10 now.

error:
build.xml:46: sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through an env var
log:
it say, build so have error. you can retry many timer: > cocos compile -p android -m release --ap 10

error:
make.exe: *** No rule to make target `D:/setup/develop/android/android-ndk-r9-windows-x86_64/android-ndk-r9/sources/android/cpufeatures/cpu-features.c', needed by `obj/local/armeabi/objs/cpufeatures/cpu-features.o'.  Stop.
log:
delete obj/cpu-features.*
rebuld.

error:
The import org.cocos2dx.lib cannot be resolved    AppActivity.java    /Snake/src/org/cocos2dx/cpp    line 29    Java Problem
log:
import exist project to android project from dir: cocos2d-x dir\cocos2d\cocos\platform\android\java

 

want:
add google analytics to cocos2d-x 3.0:
log:
1.copy libGoogleAnalyticsV2.jar to libs/
2.modify org.cocos2dx.cpp.AppActivity:
      public void onStart() {
        super.onStart();
        EasyTracker.getInstance().activityStart(this);
      }

      public void onStop() {
        EasyTracker.getInstance().activityStop(this);
       
        super.onStop();
      }

want:
add google admob to cocos2d-x 3.0,when application exit show fullscreen advertisement:
log:

No comments: