"Cocos2d-x Notes" Assetmanagerex use exceptions to resolve notes->check_jni/cc ' JAVA. Lang. Noclassdeffounderror '

Source: Internet
Author: User
Tags lua

This site article is Li Himi original, reproduced must be clearly noted: (The author Sina Weibo: @ li Himi)
Reprinted from "Black Rice gamedev Block" original link: check_jni.cc jni detected ERROR in Application:jni Newglobalref called with pending exception ' JAV A.lang.noclassdeffounderror ' thrown in unknown throw location>http://www.himigame.com/iphone-cocos2dx/1928.html

Click here to subscribe to the latest blog! Notify you in time of the latest blog post!


                 

When I recently used the COCOS2DX 3.9 version, I tried to use Assetmanagerex, non-Ex is an earlier version, because it is a new extension, so try it under. It is very useful, basic process and comparison, as well as the download and other functions.

Specifically how to use not I said, should be online a lot of, now say the problem encountered.

I wrote a total of two forms:

One is C + + itself easy to package Assetmanagerex, and then put my class through Tolua binding to Lua to use, iphone test pass, no problem.

Another is the use of the LUA version of the official binding good version of Assetmanagerex test use, the iphone test passed, no problem.

The point is that when I compile to Android in either form, and configure the project (Introducing ANDROID/JAVA/SRC and android/java/libs/ Android-async-http-x.x.x.jar) running the Android project, there are always two questions:

650) this.width=650;" class= "Alignnone size-medium wp-image-1929 "Src=" http://www.himigame.com/wp-content/uploads/2016/01/cpp-300x263.jpg "alt=" cpp "width=" "height=" 263 "style = "border:1px solid rgb (153,153,153); margin:0px;padding:4px;height:auto;"/> 650) this.width=650; "Class=" Alignnone size-medium wp-image-1930 "src=" http://www.himigame.com/wp-content/uploads/2016/01/ Qq20160113-0-300x203.png "alt=" qq20160113-0 "width=" "height=" 203 "style=" border:1px solid rgb (153,153,153); Margin:0px;padding:4px;height:auto; "/>

In the beginning, I thought it was the NDK version issue or the android.mk of Android that did not add the expansion pack to participate in the compilation. It also compiles cocos2dx-3.9 's official Test-cpp/lua to Android and finds that it continues to report errors.

It dawned on me that I was reminded by a colleague's remark. In fact, Himi on the Android side of the development compared to a lot less. The introduction of jars, I introduce problems caused by.

Later I re-introduced Android-async-http-x.x.x.jar by the following steps to resolve:

Right-click on the Android project under the Libs->import->general->file system->browse ...
* This jar package is cocos2dx/cocos/platform/android/java/libs under the project
Check Select Libs->finish as above path

Sometimes the problem is relatively simple, but it is too complex to think. Quote my colleague A word "mistake does not write Java.lang.NoClassDefFoundError" hahaha. Of course, although the solution is very simple, but also himi on the development of Android some of the details of the forgotten cause ~ or need to review the lessons to do it ~

This article is from the "Li Himi" blog, please be sure to keep this source http://xiaominghimi.blog.51cto.com/2614927/1735407

"Cocos2d-x Notes" Assetmanagerex use exceptions to resolve notes->check_jni/cc ' JAVA. Lang. Noclassdeffounderror '

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.