Giter Site home page Giter Site logo

androlua's People

Contributors

mkottman avatar stevedonovan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

androlua's Issues

Where does standard output go?

For some reason I cannot find the standard output for my scripts, as it doesn't go to logcat or Android console. I'm loading them from files in programming time and executing a simple print("hello") every second, PC does it correctly but it's lost on Android. If I try other methods that would affect my application they are executed correctly so I know the scripts are being loaded.

dofile crash

lib.lua:
function functionInLuaFile(key)
return 'Require Function in Lua file . Return : '..key..'!'
end

test.lua:
dofile("lib.lua")
function callAndroidApi(context,layout,tip)
tv = luajava.newInstance("android.widget.TextView",context)
tv:setText(tip)
layout:addView(tv)
end

I use test.lua in the android project, when I use "dofile", the application crash.

Debugger now available!

I'm grateful to pass the news that Paul Kulchenko's ZeroBraneStudio now should support AndroLua debugging. The latest version of ZBS can be downloaded from https://github.com/pkulchenko/ZeroBraneStudio.git and the instructions to make it work are described in http://studio.zerobrane.com/doc-remote-debugging.html

I have tested it with LuaJava for windows and works like a charm, but Android is still resisting and I was wondering if the community could help.

The call used is require("mobdebug").start("SERVER"), where "SERVER" can be empty to reference localhost. Given the way Android connects with the system using abd I was wondering how the call would go, if someone would like to test it alongside with me.

Can't run app after using ProGuard

Hello!

Thank you for great lua lib. Unfortunately it seems there is a problem with this library when you try to run it in the app that is ProGuarded.

To reproduce the problem just clone master and try to generate signed apk (using ProGuard) from the project. Next copy apk to the device, install and run it.

Here is log dump (also pastebin):

06-02 10:19:21.533    5995-5995/?                              D/dalvikvm: Trying to load lib /data/app-lib/sk.kottman.androlua-1/libluajava.so 0x421b8db0
06-02 10:19:21.533    5995-5995/?                              D/dalvikvm: Added shared lib /data/app-lib/sk.kottman.androlua-1/libluajava.so 0x421b8db0
06-02 10:19:21.533    5995-5995/?                              D/dalvikvm: No JNI_OnLoad found in /data/app-lib/sk.kottman.androlua-1/libluajava.so 0x421b8db0, skipping init
06-02 10:19:21.540    5995-5995/?                              A/libc: Fatal signal 11 (SIGSEGV) at 0x00000020 (code=1), thread 5995 (ottman.androlua)
06-02 10:19:21.642      126-126/?                              I/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
06-02 10:19:21.642      126-126/?                              I/DEBUG: Build fingerprint: 'google/yakju/maguro:4.2.2/JDQ39/573038:user/release-keys'
06-02 10:19:21.642      126-126/?                              I/DEBUG: Revision: '9'
06-02 10:19:21.642      126-126/?                              I/DEBUG: pid: 5995, tid: 5995, name: ottman.androlua  >>> sk.kottman.androlua <<<
06-02 10:19:21.642      126-126/?                              I/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000020
06-02 10:19:21.767      126-126/?                              I/DEBUG: r0 00000000  r1 00000000  r2 4192e828  r3 4087bc98
06-02 10:19:21.767      126-126/?                              I/DEBUG: r4 00000000  r5 4192e828  r6 00000004  r7 00000000
06-02 10:19:21.767      126-126/?                              I/DEBUG: r8 bebdf658  r9 40ef8c5c  sl 4006f020  fp bebdf66c
06-02 10:19:21.767      126-126/?                              I/DEBUG: ip 4087bee4  sp bebdf618  lr 4081ef0b  pc 4081af52  cpsr 60000030
06-02 10:19:21.767      126-126/?                              I/DEBUG: d0  756f6e6520746f6e  d1  726f6d656d206867
06-02 10:19:21.767      126-126/?                              I/DEBUG: d2  4c2f6176616a6169  d3  3b6574617453616c
06-02 10:19:21.767      126-126/?                              I/DEBUG: d4  5702834857028310  d5  570283b857028380
06-02 10:19:21.767      126-126/?                              I/DEBUG: d6  57028428570283f0  d7  3f8000003f800000
06-02 10:19:21.767      126-126/?                              I/DEBUG: d8  0000000000000000  d9  0000000000000000
06-02 10:19:21.767      126-126/?                              I/DEBUG: d10 0000000000000000  d11 0000000000000000
06-02 10:19:21.767      126-126/?                              I/DEBUG: d12 0000000000000000  d13 0000000000000000
06-02 10:19:21.767      126-126/?                              I/DEBUG: d14 0000000000000000  d15 0000000000000000
06-02 10:19:21.767      126-126/?                              I/DEBUG: d16 0300000000000000  d17 0000000000000000
06-02 10:19:21.767      126-126/?                              I/DEBUG: d18 0000000000000000  d19 00bc800000b98000
06-02 10:19:21.767      126-126/?                              I/DEBUG: d20 00b6802e00b3802d  d21 00bc802f00b9802f
06-02 10:19:21.767      126-126/?                              I/DEBUG: d22 0707070703030303  d23 0000002f0000002e
06-02 10:19:21.767      126-126/?                              I/DEBUG: d24 0000000000000000  d25 0000000000000000
06-02 10:19:21.767      126-126/?                              I/DEBUG: d26 0000002f0000002f  d27 0000002f0000002f
06-02 10:19:21.767      126-126/?                              I/DEBUG: d28 0001000000010000  d29 0001000000010000
06-02 10:19:21.767      126-126/?                              I/DEBUG: d30 0003000000030000  d31 0003000000030000
06-02 10:19:21.767      126-126/?                              I/DEBUG: scr 60000090
06-02 10:19:21.775      126-126/?                              I/DEBUG: backtrace:
06-02 10:19:21.775      126-126/?                              I/DEBUG: #00  pc 00048f52  /system/lib/libdvm.so
06-02 10:19:21.775      126-126/?                              I/DEBUG: #01  pc 0004cf07  /system/lib/libdvm.so
06-02 10:19:21.775      126-126/?                              I/DEBUG: #02  pc 0000790f  /data/app-lib/sk.kottman.androlua-1/libluajava.so (Java_org_keplerproject_luajava_LuaState__1open+34)
06-02 10:19:21.775      126-126/?                              I/DEBUG: #03  pc 0001e290  /system/lib/libdvm.so (dvmPlatformInvoke+112)
06-02 10:19:21.775      126-126/?                              I/DEBUG: #04  pc 0004d411  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+396)
06-02 10:19:21.775      126-126/?                              I/DEBUG: #05  pc 0004f56f  /system/lib/libdvm.so (dvmResolveNativeMethod(unsigned int const*, JValue*, Method const*, Thread*)+174)
06-02 10:19:21.775      126-126/?                              I/DEBUG: #06  pc 000276a0  /system/lib/libdvm.so
06-02 10:19:21.775      126-126/?                              I/DEBUG: #07  pc 0002b57c  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
06-02 10:19:21.775      126-126/?                              I/DEBUG: #08  pc 0005ff07  /system/lib/libdvm.so (dvmInvokeMethod(Object*, Method const*, ArrayObject*, ArrayObject*, ClassObject*, bool)+374)
06-02 10:19:21.775      126-126/?                              I/DEBUG: #09  pc 000677e1  /system/lib/libdvm.so
06-02 10:19:21.775      126-126/?                              I/DEBUG: #10  pc 000276a0  /system/lib/libdvm.so
06-02 10:19:21.775      126-126/?                              I/DEBUG: #11  pc 0002b57c  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
06-02 10:19:21.775      126-126/?                              I/DEBUG: #12  pc 0005fc31  /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+272)
06-02 10:19:21.775      126-126/?                              I/DEBUG: #13  pc 000499fb  /system/lib/libdvm.so
06-02 10:19:21.775      126-126/?                              I/DEBUG: #14  pc 00046871  /system/lib/libandroid_runtime.so
06-02 10:19:21.775      126-126/?                              I/DEBUG: #15  pc 00047533  /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, char const*)+390)
06-02 10:19:21.775      126-126/?                              I/DEBUG: #16  pc 00000db7  /system/bin/app_process
06-02 10:19:21.775      126-126/?                              I/DEBUG: #17  pc 0001271f  /system/lib/libc.so (__libc_init+38)
06-02 10:19:21.775      126-126/?                              I/DEBUG: #18  pc 00000ae8  /system/bin/app_process
06-02 10:19:21.775      126-126/?                              I/DEBUG: stack:
06-02 10:19:21.775      126-126/?                              I/DEBUG: bebdf5d8  4192edfc  [heap]
06-02 10:19:21.775      126-126/?                              I/DEBUG: bebdf5dc  4083c79d  /system/lib/libdvm.so (dvmFindClassNoInit(char const*, Object*)+212)
06-02 10:19:21.775      126-126/?                              I/DEBUG: bebdf5e0  c0000000
06-02 10:19:21.775      126-126/?                              I/DEBUG: bebdf5e4  5d0b4438
06-02 10:19:21.775      126-126/?                              I/DEBUG: bebdf5e8  00000000
06-02 10:19:21.775      126-126/?                              I/DEBUG: bebdf5ec  00000000
06-02 10:19:21.775      126-126/?                              I/DEBUG: bebdf5f0  40ef8c64
06-02 10:19:21.775      126-126/?                              I/DEBUG: bebdf5f4  40155813  /system/lib/libc.so (dlfree+34)
06-02 10:19:21.775      126-126/?                              I/DEBUG: bebdf5f8  bebdf624  [stack]
06-02 10:19:21.775      126-126/?                              I/DEBUG: bebdf5fc  4006f010
06-02 10:19:21.775      126-126/?                              I/DEBUG: bebdf600  00000004
06-02 10:19:21.775      126-126/?                              I/DEBUG: bebdf604  4081b215  /system/lib/libdvm.so
06-02 10:19:21.775      126-126/?                              I/DEBUG: bebdf608  bebdf624  [stack]
06-02 10:19:21.775      126-126/?                              I/DEBUG: bebdf60c  4192e828  [heap]
06-02 10:19:21.775      126-126/?                              I/DEBUG: bebdf610  df0027ad
06-02 10:19:21.775      126-126/?                              I/DEBUG: bebdf614  00000000
06-02 10:19:21.775      126-126/?                              I/DEBUG: #00  bebdf618  4087bc98  /system/lib/libdvm.so
06-02 10:19:21.775      126-126/?                              I/DEBUG: bebdf61c  4081ef0b  /system/lib/libdvm.so
06-02 10:19:21.775      126-126/?                              I/DEBUG: #01  bebdf620  4192e828  [heap]
06-02 10:19:21.775      126-126/?                              I/DEBUG: bebdf624  4006f010
06-02 10:19:21.775      126-126/?                              I/DEBUG: bebdf628  57154220  /dev/ashmem/dalvik-LinearAlloc (deleted)
06-02 10:19:21.775      126-126/?                              I/DEBUG: bebdf62c  58087911  /data/app-lib/sk.kottman.androlua-1/libluajava.so (Java_org_keplerproject_luajava_LuaState__1open+36)
06-02 10:19:21.775      126-126/?                              I/DEBUG: #02  bebdf630  4018f228
06-02 10:19:21.775      126-126/?                              I/DEBUG: bebdf634  4007c0f9  /data/dalvik-cache/data@[email protected]@classes.dex
06-02 10:19:21.775      126-126/?                              I/DEBUG: bebdf638  5d762b98
06-02 10:19:21.775      126-126/?                              I/DEBUG: bebdf63c  40162b19  /system/lib/libc.so (sprintf+64)
06-02 10:19:21.775      126-126/?                              I/DEBUG: bebdf640  4006f010
06-02 10:19:21.775      126-126/?                              I/DEBUG: bebdf644  57154220  /dev/ashmem/dalvik-LinearAlloc (deleted)
06-02 10:19:21.775      126-126/?                              I/DEBUG: bebdf648  4006f010
06-02 10:19:21.775      126-126/?                              I/DEBUG: bebdf64c  00000004
06-02 10:19:21.775      126-126/?                              I/DEBUG: bebdf650  40ef8c64
06-02 10:19:21.775      126-126/?                              I/DEBUG: bebdf654  407f0294  /system/lib/libdvm.so (dvmPlatformInvoke+116)
06-02 10:19:21.790      126-126/?                              I/DEBUG: memory near r2:
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4192e808 41946d10 4018ec74 532e736f 6e694c45
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4192e818 57007875 4018ec64 00000020 00000023
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4192e828 40879334 00000000 00000001 4006f010
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4192e838 00000000 5cb17478 00000000 00000013
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4192e848 0000002e 00000000 00000000 00000153
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4192e858 7379732f 2f6d6574 6d617266 726f7765
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4192e868 6f632f6b 6a2e6572 2f3a7261 74737973
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4192e878 662f6d65 656d6172 6b726f77 726f632f
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4192e888 756a2d65 2e74696e 3a72616a 7379732f
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4192e898 2f6d6574 6d617266 726f7765 6f622f6b
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4192e8a8 79636e75 74736163 6a2e656c 2f3a7261
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4192e8b8 74737973 662f6d65 656d6172 6b726f77
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4192e8c8 7478652f 72616a2e 79732f3a 6d657473
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4192e8d8 6172662f 6f77656d 662f6b72 656d6172
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4192e8e8 6b726f77 72616a2e 79732f3a 6d657473
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4192e8f8 6172662f 6f77656d 742f6b72 70656c65
06-02 10:19:21.790      126-126/?                              I/DEBUG: memory near r3:
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4087bc78 4087b214 4087b250 40824415 40826d79
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4087bc88 4083dacd 40839d95 407fcad8 401a33f8
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4087bc98 00000000 00000000 00000000 40165761
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4087bca8 40165651 40162585 4017da2c 4017d128
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4087bcb8 4017cc9c 4017cd78 4017de88 4019d8ec
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4087bcc8 4019d548 401aa9f0 401aa9dc 401aa9b4
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4087bcd8 401aa770 4017d6fc 4017d6e8 4017d6c0
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4087bce8 401aa7a8 401a33f8 4015c408 4017d6ac
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4087bcf8 401aa9a0 40150ef5 40150f1d 40150f09
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4087bd08 40150f31 4015c70c 40076319 4015c600
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4087bd18 4008c8e9 4008c8f7 401a95b8 401a5048
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4087bd28 4015aec4 4015af34 40151d50 40151738
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4087bd38 40151c68 4017decc 401520c0 4015249c
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4087bd48 40151524 4015d690 40466487 4047c695
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4087bd58 4008c8e9 4047c699 4008c8f7 401694b1
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4087bd68 40156771 4015d560 4015b7a4 40151a24
06-02 10:19:21.790      126-126/?                              I/DEBUG: memory near r5:
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4192e808 41946d10 4018ec74 532e736f 6e694c45
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4192e818 57007875 4018ec64 00000020 00000023
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4192e828 40879334 00000000 00000001 4006f010
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4192e838 00000000 5cb17478 00000000 00000013
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4192e848 0000002e 00000000 00000000 00000153
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4192e858 7379732f 2f6d6574 6d617266 726f7765
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4192e868 6f632f6b 6a2e6572 2f3a7261 74737973
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4192e878 662f6d65 656d6172 6b726f77 726f632f
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4192e888 756a2d65 2e74696e 3a72616a 7379732f
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4192e898 2f6d6574 6d617266 726f7765 6f622f6b
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4192e8a8 79636e75 74736163 6a2e656c 2f3a7261
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4192e8b8 74737973 662f6d65 656d6172 6b726f77
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4192e8c8 7478652f 72616a2e 79732f3a 6d657473
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4192e8d8 6172662f 6f77656d 662f6b72 656d6172
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4192e8e8 6b726f77 72616a2e 79732f3a 6d657473
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4192e8f8 6172662f 6f77656d 742f6b72 70656c65
06-02 10:19:21.790      126-126/?                              I/DEBUG: memory near r8:
06-02 10:19:21.790      126-126/?                              I/DEBUG: bebdf638 5d762b98 40162b19 4006f010 57154220
06-02 10:19:21.790      126-126/?                              I/DEBUG: bebdf648 4006f010 00000004 40ef8c64 407f0294
06-02 10:19:21.790      126-126/?                              I/DEBUG: bebdf658 40ef8c58 00000001 421f2880 00000000
06-02 10:19:21.790      126-126/?                              I/DEBUG: bebdf668 421b284c 4081f415 40ef8c58 4007bd5f
06-02 10:19:21.790      126-126/?                              I/DEBUG: bebdf678 580878ed 4006f020 00000000 00000001
06-02 10:19:21.790      126-126/?                              I/DEBUG: bebdf688 c0000000 4018f228 5d380e48 5d23a628
06-02 10:19:21.790      126-126/?                              I/DEBUG: bebdf698 00000000 40155813 00000000 5d380e48
06-02 10:19:21.790      126-126/?                              I/DEBUG: bebdf6a8 5d23a628 00000000 5d760170 40150f15
06-02 10:19:21.790      126-126/?                              I/DEBUG: bebdf6b8 4012c840 408217c7 40ef8c68 4007c28e
06-02 10:19:21.790      126-126/?                              I/DEBUG: bebdf6c8 bebdf750 40831c35 4006f010 57154060
06-02 10:19:21.790      126-126/?                              I/DEBUG: bebdf6d8 00000000 bebdf750 4006f010 5d380770
06-02 10:19:21.790      126-126/?                              I/DEBUG: bebdf6e8 00000000 4006f010 bebdf75c 57154234
06-02 10:19:21.790      126-126/?                              I/DEBUG: bebdf6f8 00000001 421f2040 00000001 57154220
06-02 10:19:21.790      126-126/?                              I/DEBUG: bebdf708 000001f8 4007c312 00000008 00000000
06-02 10:19:21.790      126-126/?                              I/DEBUG: bebdf718 bebdf75c 4083cebd 4007c312 421f2040
06-02 10:19:21.790      126-126/?                              I/DEBUG: bebdf728 4007c312 0000003d 4002a000 00000001
06-02 10:19:21.790      126-126/?                              I/DEBUG: memory near r9:
06-02 10:19:21.790      126-126/?                              I/DEBUG: 40ef8c3c 00000000 57154060 40ef8c70 4007afb6
06-02 10:19:21.790      126-126/?                              I/DEBUG: 40ef8c4c 57154220 00000006 00000000 421f2880
06-02 10:19:21.790      126-126/?                              I/DEBUG: 40ef8c5c 40ef8c90 4007b376 57154098 4007afb6
06-02 10:19:21.790      126-126/?                              I/DEBUG: 40ef8c6c 00000000 00000000 421f2880 00000000
06-02 10:19:21.790      126-126/?                              I/DEBUG: 40ef8c7c 40ef8cb4 4007b6ae 57153f88 4007b376
06-02 10:19:21.790      126-126/?                              I/DEBUG: 40ef8c8c 00000000 00000000 421f1c88 421f2880
06-02 10:19:21.790      126-126/?                              I/DEBUG: 40ef8c9c 421f1aa8 40ef8ce0 585956a2 57153150
06-02 10:19:21.790      126-126/?                              I/DEBUG: 40ef8cac 4007b6ae 00000000 421f1aa8 421f1980
06-02 10:19:21.790      126-126/?                              I/DEBUG: 40ef8cbc 5704e450 421bb038 421ba2f0 00000000
06-02 10:19:21.790      126-126/?                              I/DEBUG: 40ef8ccc 40ef8d08 585f1e0c 56f27990 585956a2
06-02 10:19:21.790      126-126/?                              I/DEBUG: 40ef8cdc 00000000 00000000 421ba8e0 421bb1b0
06-02 10:19:21.790      126-126/?                              I/DEBUG: 40ef8cec 421ba2f0 00000000 40ef8d48 585c0df4
06-02 10:19:21.790      126-126/?                              I/DEBUG: 40ef8cfc 56f758d8 585f1e0c 00000000 421b8c78
06-02 10:19:21.790      126-126/?                              I/DEBUG: 40ef8d0c 421b4a40 426f0f58 421b9e20 40ef8d48
06-02 10:19:21.790      126-126/?                              I/DEBUG: 40ef8d1c 00000000 56f8cea0 00000000 421b8c78
06-02 10:19:21.790      126-126/?                              I/DEBUG: 40ef8d2c 421ba2f0 00000000 40ef8dbc 585bf0b6
06-02 10:19:21.790      126-126/?                              I/DEBUG: memory near sl:
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4006f000 00000000 00000000 00000000 00000453
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4006f010 585c0694 40ef8c58 57154098 4002a000
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4006f020 00000000 00000018 bebdf7a8 00000000
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4006f030 bebdf7dc 00000001 00000000 407f0400
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4006f040 00000000 00000000 40afaa70 40ef3300
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4006f050 00000000 421f2e30 00000001 00006000
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4006f060 00000000 401313dc 407f0400 407f52c0
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4006f070 00000000 407f93bc 407f9430 407f92e0
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4006f080 407f9300 407f935c 00000000 00000000
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4006f090 00000000 00000000 00000000 00000000
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4006f0a0 00000000 00000000 00002000 408808d4
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4006f0b0 00000000 00000000 00000007 57f90218
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4006f0c0 00000001 00000080 00000200 00000000
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4006f0d0 00000000 00000000 00000000 00000000
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4006f0e0 00000000 00000000 00000000 00000000
06-02 10:19:21.790      126-126/?                              I/DEBUG: 4006f0f0 00000000 00000000 00000000 00000000
06-02 10:19:21.790      126-126/?                              I/DEBUG: memory near fp:
06-02 10:19:21.790      126-126/?                              I/DEBUG: bebdf64c 00000004 40ef8c64 407f0294 40ef8c58
06-02 10:19:21.790      126-126/?                              I/DEBUG: bebdf65c 00000001 421f2880 00000000 421b284c
06-02 10:19:21.790      126-126/?                              I/DEBUG: bebdf66c 4081f415 40ef8c58 4007bd5f 580878ed
06-02 10:19:21.790      126-126/?                              I/DEBUG: bebdf67c 4006f020 00000000 00000001 c0000000
06-02 10:19:21.790      126-126/?                              I/DEBUG: bebdf68c 4018f228 5d380e48 5d23a628 00000000
06-02 10:19:21.790      126-126/?                              I/DEBUG: bebdf69c 40155813 00000000 5d380e48 5d23a628
06-02 10:19:21.790      126-126/?                              I/DEBUG: bebdf6ac 00000000 5d760170 40150f15 4012c840
06-02 10:19:21.790      126-126/?                              I/DEBUG: bebdf6bc 408217c7 40ef8c68 4007c28e bebdf750
06-02 10:19:21.790      126-126/?                              I/DEBUG: bebdf6cc 40831c35 4006f010 57154060 00000000
06-02 10:19:21.790      126-126/?                              I/DEBUG: bebdf6dc bebdf750 4006f010 5d380770 00000000
06-02 10:19:21.790      126-126/?                              I/DEBUG: bebdf6ec 4006f010 bebdf75c 57154234 00000001
06-02 10:19:21.790      126-126/?                              I/DEBUG: bebdf6fc 421f2040 00000001 57154220 000001f8
06-02 10:19:21.798      126-126/?                              I/DEBUG: bebdf70c 4007c312 00000008 00000000 bebdf75c
06-02 10:19:21.798      126-126/?                              I/DEBUG: bebdf71c 4083cebd 4007c312 421f2040 4007c312
06-02 10:19:21.798      126-126/?                              I/DEBUG: bebdf72c 0000003d 4002a000 00000001 4007aa88
06-02 10:19:21.798      126-126/?                              I/DEBUG: bebdf73c 4018f228 5d380770 a03688fb 41884c18
06-02 10:19:21.798      126-126/?                              I/DEBUG: memory near ip:
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4087bec4 401525a8 4015b788 401527fc 401510c0
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4087bed4 40152a50 4015136c 4015aa4c 401525fc
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4087bee4 401528a8 401526cc 4015fc59 400fb5fd
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4087bef4 400fb79d 4015abdc 40151114 4015115c
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4087bf04 4015fe91 4015ff15 4015ff7d 401606c3
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4087bf14 40156245 4015b04c 4016d9b9 4015e9d1
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4087bf24 40160e7f 4015aefc 4015b170 4015b494
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4087bf34 4015b068 4015b11c 4015b374 4015b084
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4087bf44 4009a285 4009a3ad 4009a4d5 4009a491
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4087bf54 4015bbc4 4015bb38 4015b9f4 4015ba50
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4087bf64 400fa981 401605fd 4015b014 40177005
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4087bf74 40172ee5 40169309 40169bf1 4015bb58
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4087bf84 4015ba8c 40169ab9 4015ba30 4015ba70
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4087bf94 4015c150 4015ac4c 4015b930 400fe139
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4087bfa4 400fc0a1 4015acd8 4015abf8 4015ab18
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4087bfb4 40160617 4015be3c 4015ad18 4016f4fd
06-02 10:19:21.798      126-126/?                              I/DEBUG: memory near sp:
06-02 10:19:21.798      126-126/?                              I/DEBUG: bebdf5f8 bebdf624 4006f010 00000004 4081b215
06-02 10:19:21.798      126-126/?                              I/DEBUG: bebdf608 bebdf624 4192e828 df0027ad 00000000
06-02 10:19:21.798      126-126/?                              I/DEBUG: bebdf618 4087bc98 4081ef0b 4192e828 4006f010
06-02 10:19:21.798      126-126/?                              I/DEBUG: bebdf628 57154220 58087911 4018f228 4007c0f9
06-02 10:19:21.798      126-126/?                              I/DEBUG: bebdf638 5d762b98 40162b19 4006f010 57154220
06-02 10:19:21.798      126-126/?                              I/DEBUG: bebdf648 4006f010 00000004 40ef8c64 407f0294
06-02 10:19:21.798      126-126/?                              I/DEBUG: bebdf658 40ef8c58 00000001 421f2880 00000000
06-02 10:19:21.798      126-126/?                              I/DEBUG: bebdf668 421b284c 4081f415 40ef8c58 4007bd5f
06-02 10:19:21.798      126-126/?                              I/DEBUG: bebdf678 580878ed 4006f020 00000000 00000001
06-02 10:19:21.798      126-126/?                              I/DEBUG: bebdf688 c0000000 4018f228 5d380e48 5d23a628
06-02 10:19:21.798      126-126/?                              I/DEBUG: bebdf698 00000000 40155813 00000000 5d380e48
06-02 10:19:21.798      126-126/?                              I/DEBUG: bebdf6a8 5d23a628 00000000 5d760170 40150f15
06-02 10:19:21.798      126-126/?                              I/DEBUG: bebdf6b8 4012c840 408217c7 40ef8c68 4007c28e
06-02 10:19:21.798      126-126/?                              I/DEBUG: bebdf6c8 bebdf750 40831c35 4006f010 57154060
06-02 10:19:21.798      126-126/?                              I/DEBUG: bebdf6d8 00000000 bebdf750 4006f010 5d380770
06-02 10:19:21.798      126-126/?                              I/DEBUG: bebdf6e8 00000000 4006f010 bebdf75c 57154234
06-02 10:19:21.798      126-126/?                              I/DEBUG: code around pc:
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4081af30 ecc0f7d4 f7d44638 3601ecac 454e3438
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4081af40 e8bdd1e3 bf0087fc 00045144 0004972e
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4081af50 6a03b508 6fc0f413 4909d00c e0034479
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4081af60 d50500db 44794907 ff78f7fb bd082000
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4081af70 bd082001 780a6981 d1f12a5b bf00e7f2
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4081af80 0004970a 0004971c 41f0e92d 9c064605
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4081af90 461f4616 801cf89d f7d44620 285fed16
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4081afa0 d9084404 f804232e f8043c01 f8043c02
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4081afb0 e8bd3c03 f1a581f0 28180042 e8dfd85f
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4081afc0 170df000 5e2e5e28 5e423a5e 5e5e5e3d
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4081afd0 4a5e5e5e 5e4f5e5e 00525e5e 2e09b2f6
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4081afe0 d802b272 4479492f 492fe038 e0084479
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4081aff0 f1a2b2b2 fa1f0c20 295ef18c 492bd806
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4081b000 46204479 f7d44613 e03eed58 44794928
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4081b010 4928e024 46324620 4479463b ee07e008
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4081b020 eef76a90 49240ae7 44794620 2b30ec53
06-02 10:19:21.798      126-126/?                              I/DEBUG: code around lr:
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4081eee8 d1df2d00 4603e7e9 460cb513 4619a801
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4081eef8 f970f7fc 98014621 f968f7fd f7fc4604
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4081ef08 b130f823 28076ae0 4620d009 fcc6f01d
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4081ef18 2400b928 f7fca801 4620f981 4620bd1c
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4081ef28 f0072101 4601ff25 f7fb9801 4604ff1d
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4081ef38 4603e7f0 460cb513 4619a801 f94af7fc
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4081ef48 98014621 f942f7fd 98014601 ff0cf7fb
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4081ef58 a8014604 f962f7fc bd1c4620 b5374603
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4081ef68 a801460c 46154619 f934f7fc 98014621
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4081ef78 f92cf7fd 46044629 f7fd9801 1a20f927
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4081ef88 eb444244 a8010400 f948f7fc bd3e4620
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4081ef98 b5f74603 a801460c f7fc4619 9801f91b
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4081efa8 f7fd4621 4607f913 d05e2800 447c4c31
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4081efb8 f5046824 f504754c f7d07056 463aecae
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4081efc8 21004628 e944f7db b9784607 4628492a
06-02 10:19:21.798      126-126/?                              I/DEBUG: 4081efd8 f7db4479 4929edc8 20064a29 f8b44479
06-02 10:19:21.892  26665-26686/?                              I/BootReceiver: Copying /data/tombstones/tombstone_07 to DropBox (SYSTEM_TOMBSTONE)
06-02 10:19:21.900  26665-26828/?                              I/ActivityManager: Process sk.kottman.androlua (pid 5995) has died.
06-02 10:19:21.923  26665-26828/?                              I/ActivityManager: Start proc sk.kottman.androlua for activity sk.kottman.androlua/.Main: pid=6008 uid=10088 gids={50088, 3003, 3002, 1006, 1028}
06-02 10:19:21.931  26437-26437/?                              D/Zygote: Process 5995 terminated by signal (11)

About starting with AndroLua

Hi, Michal.
I am insterested in using AndroLua. Can you give me some instructions for starting with it?
Thanks.
HERNAN CANO M
Systems Analyst

@override problems with latest SDK

Hi Michal!

You use @OverRide for interface implementations, and new SDK is picky about that, because it is not a true override of a method.

After removing these, everything worked fine, thank you!

I've modified AndroLua so that it now provides a proper little Lua REPL, with a small luasocket client program.

having activity:getFilesDir() to work in init phases

Normally it works, e.g:

$ telnet localhost 3333

print(activity:getFilesDir())
/data/data/sk.kottman.androlua/files

But when I try to use it in around there: https://github.com/stevedonovan/AndroLua/blob/master/assets/main.lua#L18

I get an error like "No such method: getFilesDir". This is probably related to the "userdata" object doesn't fully work at this stage or something.. I'm not sure if it's in Android or in AndroLua manipulations.

Can you advise? or maybe @stevedonovan ? thanks.

Community

Sorry for the non-technical issue.
I see the app has a great potential though it is a kind of middleware. So I suggest there's a need in a place for community to gather: an IRC, a forum or Google group to discuss what to do with it and how...
Please?

Make File for building .so file

Ok, this is not an AndroLua issue, but i did not know where else to post this.

I am using Gideros engine, and I need to do a few modifications to the C++ source file and build the shared library again for using with Gideros.

Can you include the 'make file' which you used to build the shared library along with the .so file?

require crash

test_json.lua:
require("json")
function functionInLuaFile(key)
return 'Require Function in test_json file . Return : '..key..'!'
end

json is a module. In test_json.lua when I require json module, the application crash.

fatal error: lua.h: No such file or directory

i use android studio
when i try to build(gradlew assembleRelease)
failed
/AndroLua/app/src/main/jni/luajava/luajava.c:40:17: fatal error: lua.h: No such file or directory
#include "lua.h"

LuaState 集合维护有问题,当有多个LuaState,关闭再创建的时候会有问题

LuaStateFactory.java update

/*

  • $Id: LuaStateFactory.java,v 1.4 2006/12/22 14:06:40 thiago Exp $
  • Copyright (C) 2003-2007 Kepler Project.
    *
  • Permission is hereby granted, free of charge, to any person obtaining
  • a copy of this software and associated documentation files (the
  • "Software"), to deal in the Software without restriction, including
  • without limitation the rights to use, copy, modify, merge, publish,
  • distribute, sublicense, and/or sell copies of the Software, and to
  • permit persons to whom the Software is furnished to do so, subject to
  • the following conditions:
    *
  • The above copyright notice and this permission notice shall be
  • included in all copies or substantial portions of the Software.
    *
  • THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  • EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  • MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  • IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  • CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  • TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  • SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    */

package org.keplerproject.luajava;

import java.util.ArrayList;
import java.util.List;

/**

  • This class is responsible for instantiating new LuaStates.

  • When a new LuaState is instantiated it is put into a List

  • and an index is returned. This index is registred in Lua

  • and it is used to find the right LuaState when lua calls

  • a Java Function.

  • @author Thiago Ponte
    /
    public final class LuaStateFactory
    {
    /
    *

    • Array with all luaState's instances
      */
      private static final List states = new ArrayList();

    /**

    • Non-public constructor.
      */
      private LuaStateFactory()
      {}

    /**

    • Method that creates a new instance of LuaState

    • @return LuaState
      */
      public synchronized static LuaState newLuaState()
      {
      int idx = getNextStateIndex();
      LuaState L = new LuaState(idx);

      int size = states.size();
      if (idx>=size ) {//当集合为空的时候 i== 0 && size == 0
      states.add(idx, L);
      }else if (idx<size && idx >= 0) {//当集合的
      states.set(idx, L) ;
      } else {
      //异常情况
      }
      return L;
      }

    /**

    • Returns a existing instance of LuaState
    • @param index
    • @return LuaState
      */
      public synchronized static LuaState getExistingState(int index)
      {
      return (LuaState) states.get(index);
      }

    /**

    • Receives a existing LuaState and checks if it exists in the states list.

    • If it doesn't exist adds it to the list.

    • @param L

    • @return int
      */
      public synchronized static int insertLuaState(LuaState L)
      {
      int idx;
      for (idx = 0 ; idx < states.size() ; idx++)
      {
      LuaState state = (LuaState) states.get(idx);

      if (state != null)
      {
          if (state.getCPtrPeer() == L.getCPtrPeer())
              return idx;
      }
      

      }

      idx = getNextStateIndex();

      int size = states.size();
      if (idx>=size ) {//当集合为空的时候 i== 0 && size == 0
      states.add(idx, L);
      }else if (idx<size && idx >= 0) {//
      states.set(idx, L) ;
      } else {
      //异常情况
      }

      return idx;
      }

    /**

    • removes the luaState from the states list
    • @param idx
      */
      public synchronized static void removeLuaState(int idx)
      {
      int size = states.size();
      if (idx<size) {
      states.set(idx, null);
      }else {
      states.add(idx, null);
      }
      }

    /**

    • Get next available index

    • @return int
      */
      private synchronized static int getNextStateIndex()
      {
      int i;
      for ( i=0 ; i < states.size() && states.get(i) != null ; i++ );

      return i;
      }
      }

Warnings when building with latest NDK 9b

Just a heads up, this appears now:

Android NDK: WARNING: APP_PLATFORM android-9 is larger than android:minSdkVersion 4 in ./AndroidManifest.xml    
Android NDK: WARNING:jni/lua/Android.mk:lua: LOCAL_LDLIBS is always ignored for static libraries    
Android NDK: WARNING:jni/lua/Android.mk:lua: non-system libraries in linker flags: -ld    
Android NDK:     This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES    
Android NDK:     or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the    
Android NDK:     current module    

view:getClass():getName()

Hi, I'm using androLua for general View widgets in android, and by just changing dot '.' to colon ':' it works well like java code.
but my lua script gets error only in getClass():getName().

Log = luajava.bindClass("android.util.Log")
function(view)
Log.d("abc",view:getClass():getName())
end

getClass() can't find getName() method. is it not possible to use 'Class' class or what's right way to use this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.