opencv android sample error
I'm having trouble running pure native OpenCV app on Android sample that is described here. "Tutorial 2 Advanced - 1. Add Native OpenCV"
I'm able to compile it properly, but it doesn't install on virtual device. It says invalid apk file.
My Android Manifest, default.properties specify virtual device 2.2 (with camera support).
I'm running OpenCV 2.3.1 version (binary), Eclipse 3.5.2, NDK 6, Android Virtual Device 2.2, Ubuntu 10.4.
My Log Cat seems to be empty.
My console Output:
Gdbserver : [arm-linux-androideabi-4.4.3] libs/armeabi-v7a/gdbser开发者_C百科ver
Gdbsetup : libs/armeabi-v7a/gdb.setup
Install : libnative_camera_r2.2.2.so => libs/armeabi-v7a/libnative_camera_r2.2.2.so
Install : libnative_camera_r2.3.3.so => libs/armeabi-v7a/libnative_camera_r2.3.3.so
Install : libnative_sample.so => libs/armeabi-v7a/libnative_sample.so
Android Launch!
adb is running normally.
Performing org.opencv.samples.tutorial3.Sample3Native activity launch
Automatic Target Mode: Several compatible targets. Please select a target device.
Uploading Tutorial 2 Advanced - 1. Add Native OpenCV.apk onto device 'emulator-5554'
Installing Tutorial 2 Advanced - 1. Add Native OpenCV.apk...
Installation failed due to invalid APK file!
Please check logcat output for more details.
Launch canceled!
What device are you using?
It seems that you are trying to install .apk built for armv7 device to the armv6 or older device.
Try to add/modify the line
APP_ABI := armeabi
in the Application.mk
file and rebuild the project.
Try cleaning the build! Go to Project --> Clean... and then running that. It'll delete your APK's and then when you run they'll be rebuilt. Worked for me!
if you try to create an apk from eclipse (right click on the project-> android tools->export signed application, sign it with the debug certification unless u have your own signature) and try to install that one o an emulator and a device what's the result ?
You said you require camera, but basically emulators do not support camera, not as far as i know, if u load the camera app you get some animation but no camera\web cam support. maybe that's the issue.
精彩评论