1
votes

I have been trying to integrate Pusher Android module in my app. After much struggle i was able to compile the module and package it with my application. But now when I try to require the added module in my application I am getting RunTime error. I have limited experience with Android. Can some suggest what wrong am I doing here.? Environment:

  • Application type: mobile
  • Titanium SDK: 3.3.0.GA
  • Platform & version: Android 16,
  • Device: Android emulator
  • Host Operating System: Windows 7
  • Titanium Studio: 3.3.0.201407100905
  • Logs:

    [ERROR] :  TiApplication: (KrollRuntimeThread) [1375,1375] Sending event: exception on thread: KrollRuntimeThread msg:java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1306]:    37 cannot locate '__cxa_end_cleanup'...
    [ERROR] :  TiApplication: ; Titanium 3.3.0,2014/07/11 12:36,787cd39
    [ERROR] :  TiApplication: java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1306]:    37 cannot locate '__cxa_end_cleanup'...
    [ERROR] :  TiApplication:
    [ERROR] :  TiApplication:   at java.lang.Runtime.loadLibrary(Runtime.java:370)
    [ERROR] :  TiApplication:   at java.lang.System.loadLibrary(System.java:535)
    [ERROR] :  TiApplication:   at org.appcelerator.kroll.runtime.v8.V8Runtime.loadExternalModules(V8Runtime.java:114)
    [ERROR] :  TiApplication:   at org.appcelerator.kroll.runtime.v8.V8Runtime.initRuntime(V8Runtime.java:81)
    [ERROR] :  TiApplication:   at org.appcelerator.kroll.KrollRuntime.doInit(KrollRuntime.java:175)
    [ERROR] :  TiApplication:   at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:109)
    [ERROR] :  AndroidRuntime: FATAL EXCEPTION: KrollRuntimeThread
    [ERROR] :  AndroidRuntime: java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1306]:    37 cannot locate '__cxa_end_cleanup'...
    [ERROR] :  AndroidRuntime:
    [ERROR] :  AndroidRuntime:  at java.lang.Runtime.loadLibrary(Runtime.java:370)
    [ERROR] :  AndroidRuntime:  at java.lang.System.loadLibrary(System.java:535)
    [ERROR] :  AndroidRuntime:  at org.appcelerator.kroll.runtime.v8.V8Runtime.loadExternalModules(V8Runtime.java:114)
    [ERROR] :  AndroidRuntime:  at org.appcelerator.kroll.runtime.v8.V8Runtime.initRuntime(V8Runtime.java:81)
    [ERROR] :  AndroidRuntime:  at org.appcelerator.kroll.KrollRuntime.doInit(KrollRuntime.java:175)
    [ERROR] :  AndroidRuntime:  at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:109)
    
1
are you facing same issue with 3.2.3 GA ? - Dragon
I tried with both 3.2.3.GA and with 3.3.0.GA. - tek3

1 Answers

1
votes

You should check NDK Path and add the compiler option "-lsupc++" due to your code may be using C++ exception mechanism and call __cxa_end_cleanup somewhere. lsupc++ (libsupc++.a)

Also, you should add -fno-rtti to avoid other maybe-encountered compilation error, this is because all android's C++ class is compiled without dynamic type info in class memory layout.

I hope my answer helps you ;)