<pre class="brush:java; toolbar: true; auto-links: false;">
public class Hello extends Cocos2dxActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
public Cocos2dxGLSurfaceView onCreateView() {
Cocos2dxGLSurfaceView glSurfaceView = new Cocos2dxGLSurfaceView(this);
// Hello should create stencil buffer
glSurfaceView.setEGLConfigChooser(5, 6, 5, 0, 16, 8);
return glSurfaceView;
}
static {
System.loadLibrary("cocos2dcpp"); //就是这句出的问题
}
}
03-04 22:59:10.461: E/AndroidRuntime(1372): java.lang.UnsatisfiedLinkError: Couldn’t load cocos2dcpp from loader dalvik.system.PathClassLoader,nativeLibraryDirectories=]]: findLibrary returned null03-04 22:59:10.461: E/AndroidRuntime(1372): at java.lang.Runtime.loadLibrary(Runtime.java:358)03-04 22:59:10.461: E/AndroidRuntime(1372): at java.lang.System.loadLibrary(System.java:526)03-04 22:59:10.461: E/AndroidRuntime(1372): at com.wsee.Hello.Hello.(Hello.java:46)