2

I have followed this link Android NDK: custom WebView compiling from source for compiling webview from source.

now i am getting this error "No implementation found for native Ltest/webkit/JWebCoreJavaBridge;.nativeConstructor:()V"

  1. i have changed all package name inside external/webkit/WebKit/android/jni with my custom package names. e.g.
  int registerJavaBridge(JNIEnv* env)
    {
        jclass javaBridge = env->FindClass("test/webkit/JWebCoreJavaBridge");
        LOG_FATAL_IF(javaBridge == NULL, "unable to find class test/webkit/JWebCoreJavaBridge");
        gJavaBridge_ObjectID = env->GetFieldID(javaBridge, "mNativeBridge", "I");
        LOG_FATAL_IF(gJavaBridge_ObjectID == NULL, "Unable to find test/webkit/JWebCoreJavaBridge.mNativeBridge");
        env->DeleteLocalRef(javaBridge);

        return jniRegisterNativeMethods(env, "test/webkit/JWebCoreJavaBridge", 
                                        gWebCoreJavaBridgeMethods, NELEM(gWebCoreJavaBridgeMethods));
    }

Do i need to change namespace also?

2.inside java code i have tried both ways of loading lib file System.load("libs/libwebcore.so"); or System.loadLibrary("webcore");

My second doubt is, my code is using system version of libwebcore.so that is present inside system/lib folder.

How to load load my version of libwebcore.so(with package name changed)?

4

0 回答 0