Billy Lau
Billy Lau

Reputation: 21

Android compile webkit from source and use it in an application

My main motivation of building my own Android webkit to minimise the rendering inconsistency of different vision of webkit on different version of android.

So far I have tried:

but application crashes on launch on device with the following errors:

04-18 10:39:23.561: W/dalvikvm(8214): No implementation found for native Lcom/tester/webkit/JWebCoreJavaBridge;.nativeConstructor 

()V
04-18 10:39:23.561: W/dalvikvm(8214): threadid=14: thread exiting with uncaught exception (group=0x2b4d61f8)
04-18 10:39:23.561: E/AndroidRuntime(8214): FATAL EXCEPTION: WebViewCoreThread
04-18 10:39:23.561: E/AndroidRuntime(8214): java.lang.UnsatisfiedLinkError: nativeConstructor
04-18 10:39:23.561: E/AndroidRuntime(8214):     at com.tester.webkit.JWebCoreJavaBridge.nativeConstructor(Native Method)
04-18 10:39:23.561: E/AndroidRuntime(8214):     at com.tester.webkit.JWebCoreJavaBridge.<init>(JWebCoreJavaBridge.java:66)
04-18 10:39:23.561: E/AndroidRuntime(8214):     at com.tester.webkit.BrowserFrame.<init>(BrowserFrame.java:237)
04-18 10:39:23.561: E/AndroidRuntime(8214):     at com.tester.webkit.WebViewCore.initialize(WebViewCore.java:236)
04-18 10:39:23.561: E/AndroidRuntime(8214):     at com.tester.webkit.WebViewCore.access$1(WebViewCore.java:230)
04-18 10:39:23.561: E/AndroidRuntime(8214):     at com.tester.webkit.WebViewCore$WebCoreThread$1.handleMessage

(WebViewCore.java:705)
04-18 10:39:23.561: E/AndroidRuntime(8214):     at android.os.Handler.dispatchMessage(Handler.java:99)
04-18 10:39:23.561: E/AndroidRuntime(8214):     at android.os.Looper.loop(Looper.java:137)
04-18 10:39:23.561: E/AndroidRuntime(8214):     at com.tester.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:748)
04-18 10:39:23.561: E/AndroidRuntime(8214):     at java.lang.Thread.run(Thread.java:856)

Am I completely in a wrong direction ? and is there a better way to minimise the rendering inconsistency of different vision of webkit on different version of android ?

Upvotes: 2

Views: 1532

Answers (1)

CommonsWare
CommonsWare

Reputation: 1006944

So far I have tried: downloaded the source code of android 2.2 and use (make framework) to make framework.jar and use it to replace android.jar from android SDK in a eclipse project

That is not going to work. First, the classes that exist on the device will supersede the same classes in your app. Second, WebKit is not implemented in Java.

Am I completely in a wrong direction ?

Yes.

and is there a better way to minimise the rendering inconsistency of different vision of webkit on different version of android ?

Do not use the things that give you "rendering inconsistency of different vision of webkit on different version of android".

Or, use frameworks that have have a compatibility layer for whatever it is that you are trying to do, where they did the work of addressing the "rendering inconsistency of different vision of webkit on different version of android".

Upvotes: 2

Related Questions