Does the chromeview project need to be built from source before attempting to use cordova-android-chromeview?

懵懂的女人 提交于 2019-12-11 12:59:20

问题


I am trying to build the example project on the cordova-android-chromeview project and I'm having a few issues. The most recent being that when deployed to the device, I receive the following runtime error:

04-25 10:29:29.593: D/CordovaActivity(1951): CordovaActivity.onCreate()
04-25 10:30:46.433: I/LibraryLoader(1951): loading: webviewchromium
04-25 10:30:46.443: D/dalvikvm(1951): Trying to load lib /data/app-lib/com.myapp.special-1/libwebviewchromium.so 0xb1d53778
04-25 10:30:46.443: D/dalvikvm(1951): Added shared lib /data/app-lib/com.myapp.special-1/libwebviewchromium.so 0xb1d53778
04-25 10:30:46.463: I/LibraryLoader(1951): loaded: webviewchromium
04-25 10:31:08.943: W/dalvikvm(1951): No implementation found for native Lorg/chromium/content/app/LibraryLoader;.nativeLibraryLoaded:([Ljava/lang/String;)I
04-25 10:37:40.423: W/jdwp(1951): Debugger is telling the VM to exit with code=1

If I read this correctly, it seems that some libraries that the app is expecting are not exposed to it. I'm not exactly sure how to track down which native files are expected. Nor am I sure how to generate ( or reference? ) the missing libraries.

I am using:

  • https://github.com/pwnall/chromeview
  • https://github.com/thedracle/cordova-android-chromeview
  • Building for Android 4.4

I am trying to run the Example project that came with cordova-android-chromeview using this syntax: ./bin/create ~/Desktop/myapp com.myapp.special MyApp

Is it possible that chromeview simply needs to be built from the chromium source? I hope not, but that's my current thinking.

Thanks in advance, any help would be appreciated.


回答1:


First change Target to anything between 4.0 and 4.3. ChromeView does not work on Android 4.4 because there WebView is already driven by ChromeView.

If that does not help, make sure you copied the webviewchromium.pak to your project's asset folder.

Changing build target to Android 4.3 did the trick for me.



来源:https://stackoverflow.com/questions/23300344/does-the-chromeview-project-need-to-be-built-from-source-before-attempting-to-us

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!