iotashan / TiTouchImageView

Titanium native module for TouchImageView
MIT License
70 stars 28 forks source link

Crashes on Android 6.0 (targetSdkVersion=23) #11

Open andersdp opened 8 years ago

andersdp commented 8 years ago

App fails to launch when module is included in tiapp.xml but only on a real device - it works in Genymotion simulator.

What needs to be done in order to make the module run on a device with Android 6.0?

maxdangelo commented 8 years ago

Hi,

I have exactly the same issue, it works in Genymotion and crashes during launch.

pke commented 8 years ago

Crashes the app on devices running Android 6.0

java.lang.UnsatisfiedLinkError: dlopen failed: /data/app/myapp-1/lib/arm/liborg.iotashan.TiTouchImageView.so: has text relocations at java.lang.Runtime.loadLibrary(Runtime.java:372) at java.lang.System.loadLibrary(System.java:1076) at org.appcelerator.kroll.runtime.v8.V8Runtime.loadExternalModules(V8Runtime.java:132) at org.appcelerator.kroll.runtime.v8.V8Runtime.initRuntime(V8Runtime.java:99) at org.appcelerator.kroll.KrollRuntime.doInit(KrollRuntime.java:185) at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:109)

AppWerft commented 8 years ago

I have similar issues: If I embed the module in my app then to runtime appears: „Cannot find module“ if I call:


function getImageon(url, cb) {
    var $ = Ti.Network.createHTTPClient({
        onload : function() {
            cb(this.responseData);
        }
    });
    $.open('GET', url);
    $.send();
}

module.exports = function(species) {
    var $ = Ti.UI.createWindow({
        backgroundColor : 'transparent',
        title : '',
        theme : 'Theme.NoActionBar',
        fullscreen : true,
    });
    var TiTouchImageView = require('org.iotashan.titouchimageview');
    $.zoomView = TiTouchImageView.createView();
    getImage(species.bigimage, function(blob) {
        $.zoomView.image = blob;
    });
    $.add(zoomView);
    return $;
};

Second I tried to recompile. In this case I got errors with ndk. Here my build.properties:

titanium.platform=/Users/fuerst/Library/Application Support/Titanium/mobilesdk/osx/5.1.1.GA/android
android.platform=/Users/fuerst/Library/android-sdk-macosx/platforms/android-21
google.apis=/Users/fuerst/Library/android-sdk-macosx/add-ons/addon-google_apis-google-21
android.ndk=/Users/fuerst/Library/android-ndk-macosx/
gimdongwoo commented 8 years ago

I'm tested on Anroid 6.0.1 (Nexus 5) / Ti. SDK 5.1.2.GA. but, it's ok. no error.

gsoulie commented 8 years ago

Hello, same issue this morning after updating my Appcelerator CLI to 5.2.0 + Studio 4.5.0, using 5.1.2.GA SDK on Android 6.0.1 (Nexus 6) :/ It works fine last week before updating CLI on same phone (Nexus 6, Android 6.0.1)

echeung3 commented 8 years ago

Same issue here.

Looks like the build just needs to be recompiled with the latest NDK. Can we get a new build release?

Reference: https://github.com/appcelerator-modules/ti.compression/issues/6 https://jira.appcelerator.org/browse/TIMOB-20071

AppWerft commented 8 years ago

I'm using Ti.Touchgallery https://github.com/gbaldera/TiTouchGallery Maybe you must think about new permissions.

rollsroyc3 commented 8 years ago

Thanks. I updated the build.properties file and recompiled and it seems to be working for me now on 5.0.1.

AppWerft commented 8 years ago

Good message!

SudoPlz commented 8 years ago

@rollsroyc3 Can you please upload it and pull request, or whatever, I need this as well, I can't run this on Titanium 5.2.2GA and I have no idea how to rebuild a module.

rollsroyc3 commented 8 years ago

@SudoPlz Yeah I will when I get a chance, what error are you getting?

gimdongwoo commented 8 years ago

TiTouchImageView need to storage permisson on Android 6.0+.

Ti.SDK support request storage permission on Ti.SDK 5.4.0.

Therefore, using this module before released 5.4.0.GA. https://github.com/gimdongwoo/Ti-Android-RequestStoragePermission

wallanoo commented 8 years ago

@gimdongwoo I've tried your module for permissions, it works right, but I still have the crash, also with your module, when I launch the app if I add the

org.iotashan.titouchimageview

row on tiapp.xml

how can I solve it? SDK 5.1.2 and Android 6.0.1 on Nexus 6