pwnall / chromeview

Proof of concept Android WebView implementation based on Chromium code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

java.lang.NoClassDefFoundError: org.chromium.content.R$string

phildo77 opened this issue · comments

Using Intellij IDEA 13.1.1

I'm at a loss on this one... Can anyone point me in the right direction? Thanks!
Maybe something needs to be changed with the chromium code?
Is it my IDE?

This exception is thrown when I call ChromeView cv = new ChromeView(this):

java.lang.NoClassDefFoundError: org.chromium.content.R$string
at org.chromium.content.browser.ContentViewCore.initialize(ContentViewCore.java:661)
at org.chromium.android_webview.AwContents.createAndInitializeContentViewCore(AwContents.java:334)
at org.chromium.android_webview.AwContents.(AwContents.java:369)
at org.chromium.android_webview.AwContents.(AwContents.java:322)
at us.costan.chrome.ChromeView.(ChromeView.java:90)
at us.costan.chrome.ChromeView.(ChromeView.java:62)
at net.hidden.hidden.MainActivity.initUI(MainActivity.java:244)
at net.hidden.hidden.MainActivity.onCreate(MainActivity.java:131)
at android.app.Activity.performCreate(Activity.java:5372)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2267)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2359)
at android.app.ActivityThread.access$700(ActivityThread.java:165)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1326)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5455)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1187)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
at dalvik.system.NativeStart.main(Native Method)

Could it be your directories are not setup properly?
http://stackoverflow.com/questions/16488892/intellij-importing-android-project-from-eclipse-leads-to-duplicate-class-error/21022992#21022992

It is not entirely the same but maybe it gives you a hint looking at the directories.

Thanks for the quick response! I don't think that's it though. My gut is telling me that I might be missing a step with Chromium... Do I need to do a build of the Chromium stuff?

And you followed this step?
https://github.com/pwnall/chromeview#copy-data
As I understand this, the whole Chromium is setup as a library but not all the files are available to your own project (hence copying the .pak file)

I did. And I think it gets deployed... More from logcat:

03-23 13:53:06.010 965-965/? I/LibraryLoader﹕ loading: webviewchromium
03-23 13:53:06.010 965-965/? D/dalvikvm﹕ Trying to load lib /data/app-lib/net.hidden.hidden-2/libwebviewchromium.so 0x416ef908
03-23 13:53:06.391 965-965/? D/dalvikvm﹕ Added shared lib /data/app-lib/net.hidden.hidden-2/libwebviewchromium.so 0x416ef908
03-23 13:53:06.411 965-965/? I/LibraryLoader﹕ loaded: webviewchromium
03-23 13:53:06.421 965-965/? I/chromium﹕ [INFO:library_loader_hooks.cc(71)] Chromium logging enabled: level = 0, default verbosity = 0
03-23 13:53:06.470 965-965/? W/dalvikvm﹕ VFY: unable to resolve static field 6645 (date_picker_dialog_title) in Lorg/chromium/content/R$string;
03-23 13:53:06.470 965-965/? D/dalvikvm﹕ VFY: replacing opcode 0x60 at 0x0034
03-23 13:53:06.480 965-965/? W/dalvikvm﹕ VFY: unable to resolve static field 6644 (date_picker_dialog_set) in Lorg/chromium/content/R$string;
03-23 13:53:06.480 965-965/? D/dalvikvm﹕ VFY: replacing opcode 0x60 at 0x0042
03-23 13:53:06.490 965-965/? D/dalvikvm﹕ GREF has increased to 201
03-23 13:53:06.510 965-965/? I/BrowserProcessMain﹕ Initializing chromium process, renderers=0
03-23 13:53:06.951 965-979/? I/ResourceExtractor﹕ Extracting resource webviewchromium.pak
03-23 13:53:07.500 965-965/? W/chromium﹕ [WARNING:resource_bundle.cc(255)] locale_file_path.empty()
03-23 13:53:07.510 965-988/? W/chromium﹕ [WARNING:proxy_service.cc(889)] PAC support disabled because there is no system implementation
03-23 13:53:07.991 965-965/? E/chromium﹕ [ERROR:aw_browser_context.cc(191)] Not implemented reached in virtual quota::SpecialStoragePolicy* android_webview::AwBrowserContext::GetSpecialStoragePolicy()
03-23 13:53:07.991 965-965/? E/chromium﹕ [ERROR:aw_browser_context.cc(191)] Not implemented reached in virtual quota::SpecialStoragePolicy* android_webview::AwBrowserContext::GetSpecialStoragePolicy()
03-23 13:53:08.001 965-965/? E/chromium﹕ [ERROR:aw_browser_context.cc(191)] Not implemented reached in virtual quota::SpecialStoragePolicy* android_webview::AwBrowserContext::GetSpecialStoragePolicy()
03-23 13:53:08.001 965-965/? E/chromium﹕ [ERROR:aw_browser_context.cc(191)] Not implemented reached in virtual quota::SpecialStoragePolicy* android_webview::AwBrowserContext::GetSpecialStoragePolicy()
03-23 13:53:08.001 965-965/? E/chromium﹕ [ERROR:aw_browser_context.cc(191)] Not implemented reached in virtual quota::SpecialStoragePolicy* android_webview::AwBrowserContext::GetSpecialStoragePolicy()
03-23 13:53:08.011 965-965/? E/chromium﹕ [ERROR:aw_browser_context.cc(191)] Not implemented reached in virtual quota::SpecialStoragePolicy* android_webview::AwBrowserContext::GetSpecialStoragePolicy()
03-23 13:53:08.070 965-965/? W/dalvikvm﹕ VFY: unable to resolve static field 6640 (accessibility_content_view) in Lorg/chromium/content/R$string;
03-23 13:53:08.070 965-965/? W/dalvikvm﹕ VFY: unable to resolve static field 6640 (accessibility_content_view) in Lorg/chromium/content/R$string;
03-23 13:53:08.070 965-965/? D/dalvikvm﹕ VFY: replacing opcode 0x60 at 0x0045
03-23 13:53:08.090 965-965/? W/dalvikvm﹕ VFY: unable to resolve static field 6630 (link_preview_overlay_radius) in Lorg/chromium/content/R$dimen;
03-23 13:53:08.090 965-965/? D/dalvikvm﹕ VFY: replacing opcode 0x60 at 0x000b
03-23 13:53:08.100 965-965/? W/dalvikvm﹕ VFY: unable to resolve static field 6633 (ondemand_overlay) in Lorg/chromium/content/R$drawable;
03-23 13:53:08.100 965-965/? D/dalvikvm﹕ VFY: replacing opcode 0x60 at 0x0008
03-23 13:53:08.110 965-965/? D/AndroidRuntime﹕ Shutting down VM
03-23 13:53:08.110 965-965/? W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41465700)

Then the exception above.

I cannot help you any further :-( I am in this case a simple bystander hoping I could help you out.
I am also developing with IntelliJ had a couple of similar issues. I has been a couple of months ago I tried to build this also, did not experience any issues like yours.

We must wait on the owner of this project.

For me the library loads too but returns an java.lang.UnsatisfiedLinkError: Native method not found: org.chromium.content.app.LibraryLoader.nativeLibraryLoaded:([Ljava/lang/String;)I

To me this looks like an incompatibility between the PAK and the hooking into the Android Java Code. Perhaps something was changed on either side of that interface and now the method is no longer accessible through JNDI.