您的位置:首页 > 移动开发 > Android开发

android webview javascript api扩展, armeabi-v7 armeabi,兼谈SDK及其开发者的品行

2015-11-16 23:04 501 查看
用到了某sdk,调用起来一直有问题,他们说别人用的好好的,为啥就你的app有问题?

碰到这样的无奈,最好的办法就是人赃俱获,自己追踪log

Line 5513: E/Web Console(10934): Uncaught TypeError: Object [object Object] has no method 'callBack':15

反编译sdk代码:



补充:sdk的源码里已经加的@JavascriptInterface了,只是生成的jar里这个丢失了。暂时没有解决。

先把android:targetSdkVersion="18" 改为 android:targetSdkVersion="16" 回避一下这个问题先。

上面是原始代码,下面是提示他们如何改的。
麻蛋,这种没有责任感的工程师估计永远只能做个菜鸟码农了。

另外,他们的so仅提供的armeabi版,也提示他们同时提供armeabi-v7,x86版,作为一个sdk,显然要做的通用一点,牛逼一点,不能成为使用者的障碍。这样搞,让追求效率的app怎么办? why,自己补习下面的知识。
===================================

EABI = Embedded Application Binary Interface

http://stackoverflow.com/questions/7080525/why-use-armeabi-v7a-code-over-armeabi-code

如果app里同时有armeabi-v7a, armeabi目录,app安装时仅扫描primary-abi目录,primary-abi目录不存在时扫描secondary-abi目录

http://stackoverflow.com/questions/16105791/using-armv7-and-arm-library-in-the-same-android-app

III.3. Automatic extraction of native code at install time:
-----------------------------------------------------------

When installing an application, the package manager service will scan
the .apk and look for any shared library of the form:

lib/<primary-abi>/lib<name>.so

If one is found, then it is copied under $APPDIR/lib/lib<name>.so,
where $APPDIR corresponds to the application's specific data directory.

If none is found, and a secondary ABI is defined, the service will
then scan for shared libraries of the form:

$ adb shell getprop|grep abi
[ro.product.cpu.abi2]: [armeabi]
[ro.product.cpu.abi]: [armeabi-v7a]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  javascript armeabi sdk