0

I am new in android and eclipse. Please help. Thank you so much. I edited and saved my code in eclipse, then delete the app in my emulator, then select Debug as => android application. but eclipse installs the older version of codes to the emulator every time. how to fix it?

for example. the codes was

CCLOG("Test String");
CCLOG("visibleSize:%.1f,%.1f",visibleSize.width,visibleSize.height);
CCLOG("origin:%.1f,%.1f",origin.x,origin.y);

then changed to

CCLOG("visibleSize:%.1f,%.1f",visibleSize.width,visibleSize.height);
CCLOG("origin:%.1f,%.1f",origin.x,origin.y);

eclipse still prints out Test String.

Please help. Thank you so much.

Phyerh
  • 21
  • 4
  • Clean the project. Then remove the gen & bin folders. Then try again. You shouldn't be using anymore Eclipse for Android dev. –  Nov 01 '15 at 15:24
  • If I want to use cocos2dx then What should I use for Android dev.? cocos studio? thank you – Phyerh Nov 03 '15 at 14:44
  • Hi @Phyerh. If you code under Windows, the best option is to use Visual Studio Community. It's free (even for commercial use for small teams) and have a great debugger + you can build the win32 app, to test your application under Windows and then compile the app for android with `cocos` tool (via command line). – y434y Nov 05 '15 at 08:55

1 Answers1

0

You can also use android studio. By the way you can write code in any editor you want and just install app from console (using cocos tool). I usually write all stuff in xcode (app is for ios too) and just run it from eclipse, because writing c++ in it is like being in hell. You said you run app by using "Debug as". It won't just work like that in eclipse. Eclipse doesn't compile any stuff, it simply runs python script, which compile your app. And it still won't be debuggable (so you can't use breakpoints etc.).

Check out this answer: https://stackoverflow.com/a/24351602/1264375 for making your app debuggable.

Community
  • 1
  • 1
Makalele
  • 7,431
  • 5
  • 54
  • 81