brownemint / Ti-Android-CameraView

MIT License
23 stars 15 forks source link

Fails on Android Marshmallow #12

Closed vgraybeal closed 8 years ago

vgraybeal commented 8 years ago

My app crashes with this message on Android Marshmallow when this module is included. It fails as soon as the app opens - I can't even get to the window where I use the camera.

[ERROR] linker: /data/app/com.pointsource.insurancepoc-1/lib/arm/libpw.custom.androidcamera.so: has text relocations
[ERROR] TiApplication: (KrollRuntimeThread) [28,65] Sending event: exception on thread: KrollRuntimeThread msg:java.lang.UnsatisfiedLinkError: dlopen failed: /data/app/com.pointsource.insurancepoc-1/lib/arm/libpw.custom.androidcamera.so: has text relocations; Titanium 5.1.2,2015/12/16 19:00,ca822b2
[ERROR] TiApplication: java.lang.UnsatisfiedLinkError: dlopen failed: /data/app/com.pointsource.insurancepoc-1/lib/arm/libpw.custom.androidcamera.so: has text relocations
pwwolf commented 8 years ago

I checked out the project myself, rebuilt the module, and now it works on Marshmallow.

This is using a much newer SDK and NDK: android-23 instead of android-10, and NDK r9 instead of r7.

I also had to set the architectures field in the manifest file to get it to build, i.e.

#
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 0.6.3
apiversion: 2
description: Custom Android Camera
architectures: armeabi armeabi-v7a x86
...
brownemint commented 8 years ago

@vgartland I've just uploaded a new version of the module, 0.6.4 which should solve this issue. I'm afraid I do not have a device running Android M, so would appreciate it if you could test it and let me know if there are any issues.

pwwolf commented 8 years ago

I tried out the 0.6.4 build on Marshmallow, and it worked. Thanks.

brownemint commented 8 years ago

Thanks for confirming @pwwolf