[COCOS2D-X Remarks] ASSETMANAGEREX use exception to solve remarks-) CHECK_JNI/CC 'java. LANG. NOCLASSDEFFOUNDERROR'

Source: Internet
Author: User

[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 ~

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.