[英]How to include a prebuilt library on Android?
I have a 2 prebuilt libFOO.so libraries for android. 我有一个2个预先构建的libFOO.so用于android的库。 I have copied them on:
我已将它们复制到:
Projectfolder/lib/armeabi/libFOO.so
Projectfolder/lib/armeabi/libFOO2.so
Projectfolder/lib/armeabi-v7a/libFOO.so
Projectfolder/lib/armeabi-v7a/libFOO2.so
The problem is that when I build the .apk I don't even have the "lib" folder! 问题是,当我构建.apk时,我甚至没有“lib”文件夹! How can I make eclipse include these libraries on the .apk?
我如何让eclipse在.apk上包含这些库?
Try to rename the lib
folder to libs
. 尝试将
lib
文件夹重命名为libs
。 That works for our project. 这适用于我们的项目。 Nevertheless this results in a
lib
folder containing the libraries in your .apk package. 然而,这会产生一个包含.apk包中的库的
lib
文件夹。
I think you have to put external library in your manifest.xml under application
tag. 我认为您必须将外部库放在
application
下的manifest.xml中。
ex : <uses-library android:name="com.your.external.package" />
例如:
<uses-library android:name="com.your.external.package" />
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.