简体   繁体   English

在android中使用NDK在代码中使用webcore库

[英]use webcore library in code using NDK in android

I am developing webkit and want to use it in android. 我正在开发webkit并希望在android中使用它。 firstly I am trying to use android own webkit in code. 首先,我试图在代码中使用Android自己的webkit。 so the steps I am using. 所以我正在使用的步骤。

  1. I have downloaded android (froyo) source code. 我已经下载了android(froyo)源代码。
  2. I have compiled that source code using android.mk and created all libraries (.so) 我使用android.mk编译了源代码并创建了所有库(.so)
  3. then I am taking webcore.so and copied it in libs/armeabi folder in code. 然后我正在使用webcore.so并将其复制到代码中的libs / armeabi文件夹中。
  4. then I am loading this library using this code. 然后我使用此代码加载此库。

- -

static {
         System.loadLibrary("webcore");
}

but that is giving UnsatisfiedLinkError . 但那是给出UnsatisfiedLinkError as If I am trying some other demo libraries that are working fine. 如果我正在尝试一些其他正常工作的演示库。 so please suggest me that where is the problem? 所以请告诉我问题出在哪里?

Is there any problem of dependencies of other library used by webcore or something else? 是否存在webcore或其他东西使用的其他库的依赖性问题?

Thanks Saurabh 谢谢Saurabh

Are you creating your own apk file ? 你在创建自己的apk文件吗? Are you running on the froyo SDK ? 你在froyo SDK上运行吗?

Most possibly it's the webcore can not load the depended libraries. 最有可能的是,webcore无法加载依赖的库。 You can try to push the depended libraries to the /system/lib/ and have a try. 您可以尝试将依赖的库推送到/ system / lib /并尝试一下。

If you are running your apk on a device instead emulator, such as samsung or motorola phone , then, there's also another possibility that some functions you called in the webcore is removed or renamed by these vendors. 如果你在设备而不是模拟器上运行你的apk,例如三星或摩托罗拉手机,那么,还有另一种可能性,即你在webcore中调用的某些功能被这些供应商删除或重命名。 I have fixed a lot of these kind of issues when I was developing a cross platform Browser. 在开发跨平台浏览器时,我已经解决了很多这类问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM