I have fixed that No implementation found for native Ldoug/irrlicht/GLNative;.init:
error by adding JNIEXPORT when implementing native functions and unsatisfied linker error was due to my mistake in library name while loading. Now my log cat contains these things:
11-27 02:54:35.058: D/AndroidRuntime(927): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
11-27 02:54:35.058: D/AndroidRuntime(927): CheckJNI is ON
11-27 02:54:35.138: D/dalvikvm(927): Trying to load lib libjavacore.so 0x0
11-27 02:54:35.159: D/dalvikvm(927): Added shared lib libjavacore.so 0x0
11-27 02:54:35.218: D/dalvikvm(927): Trying to load lib libnativehelper.so 0x0
11-27 02:54:35.218: D/dalvikvm(927): Added shared lib libnativehelper.so 0x0
11-27 02:54:35.358: E/cutils-trace(927): Error opening trace file: No such file or directory (2)
11-27 02:54:36.178: D/AndroidRuntime(927): Calling main entry com.android.commands.pm.Pm
11-27 02:54:36.288: W/ActivityManager(276): No content provider found for permission revoke: file:///data/local/tmp/IrrHelloWorld.apk
11-27 02:54:37.198: W/ActivityManager(276): No content provider found for permission revoke: file:///data/local/tmp/IrrHelloWorld.apk
11-27 02:54:37.198: I/PackageManager(276): Copying native libraries to /data/app-lib/vmdl448300730
11-27 02:54:39.708: I/ActivityManager(276): Force stopping package doug.irrlicht appid=10048 user=-1
11-27 02:54:40.108: D/dalvikvm(276): GC_FOR_ALLOC freed 727K, 28% free 6259K/8660K, paused 110ms, total 110ms
11-27 02:54:40.128: I/PackageManager(276): Package doug.irrlicht codePath changed from /data/app/doug.irrlicht-2.apk to /data/app/doug.irrlicht-1.apk; Retaining data and using new
11-27 02:54:41.250: I/PackageManager(276): Running dexopt on: doug.irrlicht
11-27 02:54:41.489: D/dalvikvm(938): DexOpt: load 77ms, verify+opt 28ms, 199700 bytes
11-27 02:54:41.508: I/ActivityManager(276): Force stopping package doug.irrlicht appid=10048 user=-1
11-27 02:54:41.518: W/PackageManager(276): Code path for pkg : doug.irrlicht changing from /data/app/doug.irrlicht-2.apk to /data/app/doug.irrlicht-1.apk
11-27 02:54:41.518: W/PackageManager(276): Resource path for pkg : doug.irrlicht changing from /data/app/doug.irrlicht-2.apk to /data/app/doug.irrlicht-1.apk
11-27 02:54:41.768: I/ActivityManager(276): Force stopping package doug.irrlicht appid=10048 user=0
11-27 02:54:41.919: D/dalvikvm(406): GC_EXPLICIT freed 124K, 26% free 9364K/12652K, paused 5ms+16ms, total 133ms
11-27 02:54:42.018: D/dalvikvm(431): GC_EXPLICIT freed 135K, 13% free 2845K/3244K, paused 5ms+14ms, total 183ms
11-27 02:54:42.178: I/InputReader(276): Reconfiguring input devices. changes=0x00000010
11-27 02:54:42.268: D/BackupManagerService(276): Received broadcast Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:doug.irrlicht flg=0x8000010 (has extras) }
11-27 02:54:42.328: W/ContextImpl(788): Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:1385 android.content.ContextWrapper.startService:473 android.content.ContextWrapper.startService:473 com.android.keychain.KeyChainBroadcastReceiver.onReceive:12 android.app.ActivityThread.handleReceiver:2424
11-27 02:54:42.569: D/BackupManagerService(276): Received broadcast Intent { act=android.intent.action.PACKAGE_ADDED dat=package:doug.irrlicht flg=0x8000010 (has extras) }
11-27 02:54:42.618: V/BackupManagerService(276): removePackageParticipantsLocked: uid=10048 #1
11-27 02:54:42.628: I/InputReader(276): Reconfiguring input devices. changes=0x00000010
11-27 02:54:42.678: V/BackupManagerService(276): addPackageParticipantsLocked: #1
11-27 02:54:43.369: I/Choreographer(406): Skipped 164 frames! The application may be doing too much work on its main thread.
11-27 02:54:44.458: I/Choreographer(406): Skipped 208 frames! The application may be doing too much work on its main thread.
11-27 02:54:45.038: D/dalvikvm(406): GC_FOR_ALLOC freed 3731K, 40% free 7603K/12652K, paused 78ms, total 96ms
11-27 02:54:45.228: I/Choreographer(406): Skipped 77 frames! The application may be doing too much work on its main thread.
11-27 02:54:46.468: D/dalvikvm(276): GC_EXPLICIT freed 805K, 30% free 6093K/8660K, paused 294ms+50ms, total 2164ms
11-27 02:54:46.678: D/dalvikvm(406): GC_FOR_ALLOC freed 304K, 30% free 8975K/12652K, paused 58ms, total 60ms
11-27 02:54:46.939: I/Choreographer(406): Skipped 92 frames! The application may be doing too much work on its main thread.
11-27 02:54:47.052: W/RecognitionManagerService(276): no available voice recognition services found for user 0
11-27 02:54:47.058: D/AndroidRuntime(927): Shutting down VM
11-27 02:54:47.068: D/dalvikvm(927): Debugger has detached; object registry had 1 entries
11-27 02:54:48.048: D/AndroidRuntime(943): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
11-27 02:54:48.048: D/AndroidRuntime(943): CheckJNI is ON
11-27 02:54:48.108: D/dalvikvm(943): Trying to load lib libjavacore.so 0x0
11-27 02:54:48.128: D/dalvikvm(943): Added shared lib libjavacore.so 0x0
11-27 02:54:48.188: D/dalvikvm(943): Trying to load lib libnativehelper.so 0x0
11-27 02:54:48.188: D/dalvikvm(943): Added shared lib libnativehelper.so 0x0
11-27 02:54:48.298: E/cutils-trace(943): Error opening trace file: No such file or directory (2)
11-27 02:54:49.088: D/AndroidRuntime(943): Calling main entry com.android.commands.am.Am
11-27 02:54:49.108: D/dalvikvm(943): Note: class Landroid/app/ActivityManagerNative; has 163 unimplemented (abstract) methods
11-27 02:54:49.139: I/ActivityManager(276): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=doug.irrlicht/.IrrHelloWorld} from pid 943
11-27 02:54:49.209: W/WindowManager(276): Screenshot failure taking screenshot for (246x410) to layer 21005
11-27 02:54:49.269: D/AndroidRuntime(943): Shutting down VM
11-27 02:54:49.269: D/jdwp(943): Got wake-up signal, bailing out of select
11-27 02:54:49.269: D/dalvikvm(943): Debugger has detached; object registry had 1 entries
11-27 02:54:49.289: W/dalvikvm(954): PR_CAPBSET_DROP 0 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
11-27 02:54:49.289: W/dalvikvm(954): PR_CAPBSET_DROP 1 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
11-27 02:54:49.298: W/dalvikvm(954): PR_CAPBSET_DROP 2 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
11-27 02:54:49.298: W/dalvikvm(954): PR_CAPBSET_DROP 3 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
11-27 02:54:49.298: W/dalvikvm(954): PR_CAPBSET_DROP 4 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
11-27 02:54:49.298: W/dalvikvm(954): PR_CAPBSET_DROP 5 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
11-27 02:54:49.298: W/dalvikvm(954): PR_CAPBSET_DROP 6 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
11-27 02:54:49.298: W/dalvikvm(954): PR_CAPBSET_DROP 7 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
11-27 02:54:49.298: W/dalvikvm(954): PR_CAPBSET_DROP 8 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
11-27 02:54:49.298: W/dalvikvm(954): PR_CAPBSET_DROP 9 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
11-27 02:54:49.298: W/dalvikvm(954): PR_CAPBSET_DROP 10 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
11-27 02:54:49.298: W/dalvikvm(954): PR_CAPBSET_DROP 11 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
11-27 02:54:49.298: W/dalvikvm(954): PR_CAPBSET_DROP 12 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
11-27 02:54:49.298: W/dalvikvm(954): PR_CAPBSET_DROP 13 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
11-27 02:54:49.309: W/dalvikvm(954): PR_CAPBSET_DROP 14 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
11-27 02:54:49.309: W/dalvikvm(954): PR_CAPBSET_DROP 15 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
11-27 02:54:49.309: W/dalvikvm(954): PR_CAPBSET_DROP 16 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
11-27 02:54:49.309: W/dalvikvm(954): PR_CAPBSET_DROP 17 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
11-27 02:54:49.309: W/dalvikvm(954): PR_CAPBSET_DROP 18 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
11-27 02:54:49.309: W/dalvikvm(954): PR_CAPBSET_DROP 19 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
11-27 02:54:49.309: W/dalvikvm(954): PR_CAPBSET_DROP 20 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
11-27 02:54:49.309: W/dalvikvm(954): PR_CAPBSET_DROP 21 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
11-27 02:54:49.318: W/dalvikvm(954): PR_CAPBSET_DROP 22 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
11-27 02:54:49.318: W/dalvikvm(954): PR_CAPBSET_DROP 23 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
11-27 02:54:49.318: W/dalvikvm(954): PR_CAPBSET_DROP 24 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
11-27 02:54:49.318: W/dalvikvm(954): PR_CAPBSET_DROP 25 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
11-27 02:54:49.318: W/dalvikvm(954): PR_CAPBSET_DROP 26 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
11-27 02:54:49.318: W/dalvikvm(954): PR_CAPBSET_DROP 27 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
11-27 02:54:49.318: W/dalvikvm(954): PR_CAPBSET_DROP 28 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
11-27 02:54:49.318: W/dalvikvm(954): PR_CAPBSET_DROP 29 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
11-27 02:54:49.318: W/dalvikvm(954): PR_CAPBSET_DROP 30 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
11-27 02:54:49.318: W/dalvikvm(954): PR_CAPBSET_DROP 31 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
11-27 02:54:49.318: W/dalvikvm(954): PR_CAPBSET_DROP 32 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
11-27 02:54:49.318: W/dalvikvm(954): PR_CAPBSET_DROP 33 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
11-27 02:54:49.338: I/ActivityManager(276): Start proc doug.irrlicht for activity doug.irrlicht/.IrrHelloWorld: pid=954 uid=10048 gids={50048, 1015, 1028}
11-27 02:54:49.349: I/Choreographer(406): Skipped 33 frames! The application may be doing too much work on its main thread.
11-27 02:54:49.408: D/dalvikvm(954): Not late-enabling CheckJNI (already on)
11-27 02:54:51.308: D/libEGL(954): Emulator without GPU support detected. Fallback to software renderer.
11-27 02:54:51.328: D/libEGL(954): loaded /system/lib/egl/libGLES_android.so
11-27 02:54:51.378: I/Choreographer(954): Skipped 51 frames! The application may be doing too much work on its main thread.
11-27 02:54:51.548: D/gralloc_goldfish(954): Emulator without GPU emulation detected.
11-27 02:54:51.558: W/dalvikvm(954): threadid=11: thread exiting with uncaught exception (group=0x41465700)
11-27 02:54:51.558: E/AndroidRuntime(954): FATAL EXCEPTION: GLThread 84
11-27 02:54:51.558: E/AndroidRuntime(954): java.lang.IllegalArgumentException: No configs match configSpec
11-27 02:54:51.558: E/AndroidRuntime(954): at doug.irrlicht.GLView$ConfigChooser.chooseConfig(GLView.java:149)
11-27 02:54:51.558: E/AndroidRuntime(954): at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:1024)
11-27 02:54:51.558: E/AndroidRuntime(954): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1401)
11-27 02:54:51.558: E/AndroidRuntime(954): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
11-27 02:54:51.588: W/ActivityManager(276): Force finishing activity doug.irrlicht/.IrrHelloWorld
11-27 02:54:51.911: I/WindowManager(276): Screenshot max retries 4 of Token{4181b720 ActivityRecord{41884410 u0 doug.irrlicht/.IrrHelloWorld}} appWin=Window{418cd018 u0 Starting doug.irrlicht} drawState=4
11-27 02:54:51.911: W/WindowManager(276): Screenshot failure taking screenshot for (480x800) to layer 21020
11-27 02:54:52.038: I/ActivityManager(276): Displayed doug.irrlicht/.IrrHelloWorld: +2s790ms
11-27 02:54:52.058: I/Choreographer(276): Skipped 101 frames! The application may be doing too much work on its main thread.
11-27 02:54:52.139: I/Choreographer(276): Skipped 31 frames! The application may be doing too much work on its main thread.
11-27 02:54:52.288: I/Choreographer(406): Skipped 44 frames! The application may be doing too much work on its main thread.
11-27 02:54:52.418: I/Choreographer(276): Skipped 68 frames! The application may be doing too much work on its main thread.
11-27 02:54:52.998: I/Choreographer(276): Skipped 34 frames! The application may be doing too much work on its main thread.
11-27 02:54:53.508: I/Choreographer(954): Skipped 52 frames! The application may be doing too much work on its main thread.
I got that there is error in GLView.java class, here is the GLView.java code:
public GLView(Context context, boolean translucent, int depth, int stencil) {
super(context);
init(translucent, depth, stencil);
}
private void init(boolean translucent, int depth, int stencil) {
if (translucent) {
this.getHolder().setFormat(PixelFormat.TRANSLUCENT);
}
setEGLContextFactory(new ContextFactory());
setEGLConfigChooser( translucent ?
new ConfigChooser(8, 8, 8, 8, depth, stencil) :
new ConfigChooser(5, 6, 5, 0, depth, stencil) );
setRenderer(new Renderer());
}
private static class ContextFactory implements GLSurfaceView.EGLContextFactory {
private static int EGL_CONTEXT_CLIENT_VERSION = 0x3098;
public EGLContext createContext(EGL10 egl, EGLDisplay display, EGLConfig eglConfig) {
Log.w(TAG, "creating OpenGL ES 2.0 context");
checkEglError("Before eglCreateContext", egl);
int[] attrib_list = {EGL_CONTEXT_CLIENT_VERSION, 2, EGL10.EGL_NONE };
EGLContext context = egl.eglCreateContext(display, eglConfig, EGL10.EGL_NO_CONTEXT, attrib_list);
checkEglError("After eglCreateContext", egl);
return context;
}
public void destroyContext(EGL10 egl, EGLDisplay display, EGLContext context) {
egl.eglDestroyContext(display, context);
}
}
private static void checkEglError(String prompt, EGL10 egl) {
int error;
while ((error = egl.eglGetError()) != EGL10.EGL_SUCCESS) {
Log.e(TAG, String.format("%s: EGL error: 0x%x", prompt, error));
}
}
private static class ConfigChooser implements GLSurfaceView.EGLConfigChooser {
public ConfigChooser(int r, int g, int b, int a, int depth, int stencil) {
mRedSize = r;
mGreenSize = g;
mBlueSize = b;
mAlphaSize = a;
mDepthSize = depth;
mStencilSize = stencil;
}
private static int EGL_OPENGL_ES2_BIT = 4;
private static int[] s_configAttribs2 =
{
EGL10.EGL_RED_SIZE, 4,
EGL10.EGL_GREEN_SIZE, 4,
EGL10.EGL_BLUE_SIZE, 4,
EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
EGL10.EGL_NONE
};
public EGLConfig chooseConfig(EGL10 egl, EGLDisplay display) {
int[] num_config = new int[1];
egl.eglChooseConfig(display, s_configAttribs2, null, 0, num_config);
int numConfigs = num_config[0];
if (numConfigs <= 0) {
throw new IllegalArgumentException("No configs match configSpec");
}
EGLConfig[] configs = new EGLConfig[numConfigs];
egl.eglChooseConfig(display, s_configAttribs2, configs, numConfigs, num_config);
if (DEBUG) {
printConfigs(egl, display, configs);
}
return chooseConfig(egl, display, configs);
}
public EGLConfig chooseConfig(EGL10 egl, EGLDisplay display,
EGLConfig[] configs) {
for(EGLConfig config : configs) {
int d = findConfigAttrib(egl, display, config,
EGL10.EGL_DEPTH_SIZE, 0);
int s = findConfigAttrib(egl, display, config,
EGL10.EGL_STENCIL_SIZE, 0);
if (d < mDepthSize || s < mStencilSize)
continue;
int r = findConfigAttrib(egl, display, config,
EGL10.EGL_RED_SIZE, 0);
int g = findConfigAttrib(egl, display, config,
EGL10.EGL_GREEN_SIZE, 0);
int b = findConfigAttrib(egl, display, config,
EGL10.EGL_BLUE_SIZE, 0);
int a = findConfigAttrib(egl, display, config,
EGL10.EGL_ALPHA_SIZE, 0);
if (r == mRedSize && g == mGreenSize && b == mBlueSize && a == mAlphaSize)
return config;
}
return null;
}
private int findConfigAttrib(EGL10 egl, EGLDisplay display,
EGLConfig config, int attribute, int defaultValue) {
if (egl.eglGetConfigAttrib(display, config, attribute, mValue)) {
return mValue[0];
}
return defaultValue;
}
private void printConfigs(EGL10 egl, EGLDisplay display,
EGLConfig[] configs) {
int numConfigs = configs.length;
Log.w(TAG, String.format("%d configurations", numConfigs));
for (int i = 0; i < numConfigs; i++) {
Log.w(TAG, String.format("Configuration %d:\n", i));
printConfig(egl, display, configs[i]);
}
}
And the error:
11-27 02:54:35.358: E/cutils-trace(927): Error opening trace file: No such file or directory (2)
I have done a lot to fix this, even I reinstalled my ADT, nothing changed, I will post my Manifest file if needed. Does anyone know how to fix this bug?