[COCOS2D-X Remarks] ASSETMANAGEREX use exception to solve remarks-) CHECK_JNI/CC 'java. LANG. NOCLASSDEFFOUNDERROR'
When I recently used cocos2dx 3.9, I tried to use AssetManagerEx. Non-Ex is an earlier version, so I tried it because it is a new extension. It is quite helpful. The basic process and comparison and download functions are available.
I don't need to talk about how to use it. I should talk about a lot of problems on the Internet.
I have written two forms in total:
One is c ++'s own simple encapsulation of AssetManagerEx, And then I use tolua binding to lua for use. The iphone passed the test, no problem.
The other is to use the version of AssetManagerEx, which is officially bound by lua. The iphone has passed the test. No problem.
The point is that when I compile Android in whatever form and configure the project (introduce android/java/src and android/java/libs/android-async-http-x.x.x.jar) to run the Android project, there are always two problems:
When this problem occurs, I initially thought it was an ndk version problem or android. mk in android did not add the lib of the extension package for compilation. It also compiled the cocos2dx-3.9's official test-cpp/lua to android run, found that all continue to report errors.
I suddenly realized it with a message from my colleagues. In fact, Himi is much less than Android development. Jar is introduced.
Then I took the following steps to re-introduce the android-async-http-x.x.x.jar:
Right-click libs under the android project and choose import> General> File System> Browse...
* The jar package is cocos2dx/cocos/platform/android/java/libs in the project.
Select the path above-> select libs-> Finish
Sometimes the problem is relatively simple, but it is too complicated. I quoted my colleague as saying, "the error is not written in java. lang. NoClassDefFoundError." Hahaha. Of course, although the solution is simple, it is also caused by the forgetting of Himi to some details of Android development ~ I still need to review my homework ~