does anyone know how to run the proj.visualstudio for cocos2d-x 3.12 in visual studio 2015 … i the downloaded project from Here.
am using visual studio 2015 update 3 with:
NDK: android-ndk-r13b-windows-x86_64
ANT: apache-ant-1.9.7
Java: jdk-7u80-windows-x64
i don’t know if i’m right or wrong but this is what i did:
first i knew that my current visual studio installation isn’t setup to run android projects
so i modified my current visual studio installation and insalled these new packages
under visual c++ mobile devlopement
tab i installed the folwing packages :
visual c++ android devlopement (update 3)
clang with microsoft codegen (july 2016)
microsoft visual studio emulater for android (july 2016) ... hyper v has to be enabled or else the option wont show up in the installation menu
and under common tools and software devlopement kits
i installed the following packages:
android sdk [3rd Party]
android sdk setup (api 19 and 21) [3rd Party]
as for ANT, NDK, JDK i have them downloaded manualy along time ago
after that i opened Tools->Options->Cross Platform->Android to specify the ANT, NDK, JDK paths:
the problem now is that the run button is showing “No devices available” once i open the project
but if you look at my avd manager you can see that there is a device that i created … so for some reason it doesn’t recognize it?
i decided to ignore it and hit run anyways but sadly i get this compiler error after build:
Error MSB3030 Could not copy the file "E:\Cocos2d-dev-tools\cocos2d-c++\android-ndk-r13b-windows-x86_64\android-ndk-r13b\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a\thumb\libgnustl_static.a" because it was not found.
but i didn’t stop there … i tried again and after a bit of googling i got around the problem of "No devices available" by changing the solution active config from Debug|ARM
to Debug|x86
and then i choose an api-19 complaint device witch i downloded before and hit run then i get this compiler errors … wired chipmunk errors
Error Unable to open file C:\Users\Joseph\Documents\TestGame\proj.visualstudio\x86\Debug\libcocos2dcpp.so.recipe because 2 Cocos2d C:\Program Files (x86)\MSBuild\Microsoft\MDD\Android\V140\Android.Common.targets 231
Error 'chipmunk/chipmunk_private.h' file not found Cocos2dcpp C:\Users\Joseph\Documents\TestGame\cocos2d\cocos\physics\CCPhysicsBody.cpp 31
Error 'chipmunk/chipmunk_private.h' file not found Cocos2dcpp C:\Users\Joseph\Documents\TestGame\cocos2d\cocos\physics\CCPhysicsWorld.cpp 30
Error 'chipmunk/chipmunk.h' file not found Cocos2dcpp C:\Users\Joseph\Documents\TestGame\cocos2d\cocos\physics\CCPhysicsJoint.cpp 27
Error 'chipmunk/chipmunk.h' file not found Cocos2dcpp C:\Users\Joseph\Documents\TestGame\cocos2d\cocos\physics\CCPhysicsShape.cpp 31
Error 'chipmunk/chipmunk.h' file not found Cocos2dcpp C:\Users\Joseph\Documents\TestGame\cocos2d\cocos\physics\CCPhysicsContact.cpp 26
Error %lu", __func__, result); Cocos2dcpp C:\Users\Joseph\Documents\TestGame\proj.visualstudio\Cocos2dcpp\CLANGCOMPILE 1
Error %lu", __func__, result); Cocos2dcpp C:\Users\Joseph\Documents\TestGame\proj.visualstudio\Cocos2dcpp\CLANGCOMPILE 1
Error %lu", __func__, result); Cocos2dcpp C:\Users\Joseph\Documents\TestGame\proj.visualstudio\Cocos2dcpp\CLANGCOMPILE 1
Error %lu", __func__, result); Cocos2dcpp C:\Users\Joseph\Documents\TestGame\proj.visualstudio\Cocos2dcpp\CLANGCOMPILE 1
please if anyone has any ideas Help.
Update 1:
i managed to get a successful ARM build after downgrading the ndk to r11c and keeping debug|arm as the active config but even after the build succeeds there is no devices to deploy to so now am back to the problem of no devices.
Update 2:
i’m getting closer to success … now am able to get a successful X86 build but only after updating cocos2d-x version to 3.13.1 and downloading its corresponding visual studio android project from the post mentioned before … but now even after the build succeeds there is a new problem when the build finishes and the x86 emulator starts up then an error message pops up:
unable to start debugging the package 'com.CocosVisualStudio' did not start on emulator or device.
and if i go to the app tray in the emulator i can see the cocos2d app installed in there but if i run it the device stops responding and the screen goes black for a couple of seconds and then a message:
unfortunately CocosVisualStudio has stopped.
P.S 1:
to be honest it didn’t compile successfully right from the start … i had to first get rid of some chipmunk2d errors that i got after compiling the project by manually removing the “chipmunk/” part from all the chipmunk2d errors and am sure there is better way of doing this but for now it worked fine and the build succeed.
P.S 2:
i too got chipmunk2d errors when i compile cocos2d-x 3.12 proj.visualstudio and with x86 as the active platform but when fixed them manually like in 3.13.1 it didn’t work because there were other errors that i couldn’t fix so i guess every one should stay of cocos2d-x 3.12 proj.visualstudio as obviously there is something wrong with it.
Update 3:
after looking at the emulator logcat when the app is launched i see this:
cocos2d-x debug info: OpenGL error 0x0502 in ..\..\cocos2d\cocos\renderer\CCTexture2D.cpp initWithMipmaps 663
cocos2d-x debug info: OpenGL error 0x0501 in ..\..\cocos2d\cocos\renderer\CCTexture2D.cpp initWithMipmaps 663
cocos2d-x debug info: OpenGL error 0x0501 in ..\..\cocos2d\cocos\renderer\CCTexture2D.cpp initWithMipmaps 663
EGL_emulation: eglSurfaceAttrib not implemented
i don’t know why am getting these rendring related errors?
so now as it seems … the build succeeds but when it runs it can’t render?
by the way in Troubleshooting the Visual Studio Emulator for Android there is something mentioned about Emulator fails to render OpenGL content but nothing on how to fix it?