Closed konikun closed 8 years ago
@konikun I think when you use the command 'cocos compile -p android' you're using ant, or eclipse. @SonarSystems I'm not sure about this answer that I give here maybe I'm wrong I never use cocos2d-js.
@konikun please find this file 'Android.mk' D:\helloJs\frameworks\runtime-src\proj.android\jni \ Example of the path https://www.youtube.com/watch?v=_zKYyUF1SMk Check this time 5:45**
LOCAL_SRC_FILES := hellojavascript/main.cpp \ ../../Classes/JNIHelpers.cpp ../../Classes/JNIResults.cpp ../../Classes/AppDelegate.cpp Edit that files like that example and it must work. It's funny if you fix that I'm sure when you import the project to eclipse it will work. I don't know why cocos team keep eclipse working in order to compile.
Your using ANT as technically Eclipse isn't required, Eclipse is just an IDE.
I've edited the Android.mk file, as you mentioned (+ the separators).
Tried to compile to android using "cocos compile -p android" and got the same error: "SonarFrameworks.h: No such file or directory".
Then I imported the project to Cocos Code IDE, and tried to package the apk. Same error again.
Same error happening with Cocos2dx 3.8 and Cocos Helper v1.48.00 in my Mac!
Upgrade to Cocos2dx 3.10 and getting the same error. Tried fixing one error and the other error shows up.
android:hardwareAccelerated="true"
from the AndroidManifest.xmlAfter all this steps, the Project compiled successfully. But on app launch, it shows Unfortunately, App has stopped
.
Please help.
Hello everyone!
I am using Cocos2d-x v3.9 with javascript. I have a clean javascript project (freshly created with 'cocos new -l js') and I am trying to integrate the cocos helper plugin. I follow your video, up to before the point you open eclipse with ADT. Since ADT is not supported by google anymore, I don't use it.
If I try to generate an apk (via command line, 'cocos compile -p android'), compilation fails with the following error:
In file included from jni/../../Classes/JNIResults.cpp:9:0:
`jni/../../Classes/JNIResults.h:19:29: fatal error: SonarFrameworks.h: No such file or directoryinclude "SonarFrameworks.h"`
^ compilation terminated.
I understand we shouldn't need this header file in a javascript project, so what is missing?
thank you in advance!