本文介绍了Delphi XE5可以编译一个.so库,该库可以通过' System.loadLibrary在Java中加载吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以前已经使用Free Pascal FPC编译器成功编译了用Pascal编写的.so库.该库可以通过System.loadLibrary在Android Java中成功加载,并且可以通过JNI在Android Java代码中成功使用其方法.

I have previously successfully compiled a .so library written in Pascal with the Free Pascal FPC compiler. That library loads successfully in Android Java with System.loadLibrary, and its methods can be used successfully via JNI in Android Java code.

但是,已将用Delphi XE5编译且与FPC不兼容的新代码集成到我的项目中.我已经重写了代码,以便Delphi XE5可以对其进行编译.尝试使用Java中的System.loadLibrary加载新的XE5编译的库时,会发生分段错误,更确切地说是:

However, new code that has been compiled with Delphi XE5 and that is not compatible with FPC needs to integrated into my project. I have rewritten my code so that Delphi XE5 can compile it. When an attempt is made to load that new XE5-compiled library with System.loadLibrary in Java, a segmentation fault occurs, more precisely:

09-24 11:04:20.271: D/dalvikvm(4800): Trying to load lib /data/app-lib/com.<redacted>.so 0x41059e68
09-24 11:04:20.281: A/libc(4800): Fatal signal 11 (SIGSEGV) at 0x5da58480 (code=1), thread 4800 (ic.<redacted>)
09-24 11:04:20.881: I/DEBUG(123): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
09-24 11:04:20.881: I/DEBUG(123): Build fingerprint: 'asus/WW_epad/TF700T:4.2.1/JOP40D/WW_epad-10.6.1.14.4-20130329:user/release-keys'
09-24 11:04:20.881: I/DEBUG(123): Revision: '0'
09-24 11:04:20.881: I/DEBUG(123): pid: 4800, tid: 4800, name: ic.<redacted>  >>> com.<redacted> <<<
09-24 11:04:20.881: I/DEBUG(123): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 5da58480
09-24 11:04:20.911: W/NvCpuClient(492): Failed to bind to service
09-24 11:04:21.011: I/DEBUG(123):     r0 00000000  r1 00000000  r2 12c04005  r3 12c04001
09-24 11:04:21.011: I/DEBUG(123):     r4 5debf17c  r5 00000002  r6 00000004  r7 bef984e0
09-24 11:04:21.011: I/DEBUG(123):     r8 00000000  r9 408af1b0  sl 40d0abc0  fp 00000001
09-24 11:04:21.011: I/DEBUG(123):     ip 00000004  sp bef984e0  lr 00001ffc  pc 5da58480  cpsr 60000030
09-24 11:04:21.011: I/DEBUG(123):     d0  3a83126f44a00000  d1  3ddb7cdfd9d7bdbb
09-24 11:04:21.011: I/DEBUG(123):     d2  4005ac95baaff9a2  d3  3f1155e54e7e8408
09-24 11:04:21.011: I/DEBUG(123):     d4  0000000000000000  d5  3ff0000000000000
09-24 11:04:21.011: I/DEBUG(123):     d6  0027d00000000963  d7  3f8000003f800000
09-24 11:04:21.011: I/DEBUG(123):     d8  0000000000000000  d9  0000000000000000
09-24 11:04:21.011: I/DEBUG(123):     d10 0000000000000000  d11 0000000000000000
09-24 11:04:21.011: I/DEBUG(123):     d12 0000000000000000  d13 0000000000000000
09-24 11:04:21.011: I/DEBUG(123):     d14 0000000000000000  d15 0000000000000000
09-24 11:04:21.011: I/DEBUG(123):     d16 4008000000000000  d17 7e37e43c8800759c
09-24 11:04:21.011: I/DEBUG(123):     d18 0000000000000000  d19 0000000000000000
09-24 11:04:21.011: I/DEBUG(123):     d20 3fc554e7eb0eb47c  d21 3e66376972bea4d0
09-24 11:04:21.011: I/DEBUG(123):     d22 3f4de16b9c24a98f  d23 3fb0f4a31edab38b
09-24 11:04:21.011: I/DEBUG(123):     d24 3fede16b9c24a98f  d25 3fe55559ee5e69f9
09-24 11:04:21.011: I/DEBUG(123):     d26 0000000000000000  d27 0000000000000000
09-24 11:04:21.011: I/DEBUG(123):     d28 0000000000000005  d29 0000000000000000
09-24 11:04:21.011: I/DEBUG(123):     d30 0000000000000000  d31 0000000000000000
09-24 11:04:21.011: I/DEBUG(123):     scr 20000090
09-24 11:04:21.011: I/DEBUG(123): backtrace:
09-24 11:04:21.011: I/DEBUG(123):     #00  pc 5da58480  <unknown>
09-24 11:04:21.011: I/DEBUG(123):     #01  pc 00001ff8  <unknown>
09-24 11:04:21.011: I/DEBUG(123): stack:
09-24 11:04:21.011: I/DEBUG(123):          bef984a0  40081a88  
09-24 11:04:21.011: I/DEBUG(123):          bef984a4  4007077d  /system/bin/linker
09-24 11:04:21.011: I/DEBUG(123):          bef984a8  40081a88  
09-24 11:04:21.011: I/DEBUG(123):          bef984ac  00001ffc  
09-24 11:04:21.011: I/DEBUG(123):          bef984b0  12c04001  
09-24 11:04:21.011: I/DEBUG(123):          bef984b4  12c04005  
09-24 11:04:21.011: I/DEBUG(123):          bef984b8  4007c018  /system/bin/linker
09-24 11:04:21.011: I/DEBUG(123):          bef984bc  00000000  
09-24 11:04:21.011: I/DEBUG(123):          bef984c0  4007c018  /system/bin/linker
09-24 11:04:21.011: I/DEBUG(123):          bef984c4  00000000  
09-24 11:04:21.011: I/DEBUG(123):          bef984c8  00000004  
09-24 11:04:21.011: I/DEBUG(123):          bef984cc  40070f75  /system/bin/linker
09-24 11:04:21.011: I/DEBUG(123):          bef984d0  12c04001  
09-24 11:04:21.011: I/DEBUG(123):          bef984d4  5debf17c  
09-24 11:04:21.011: I/DEBUG(123):          bef984d8  df0027ad  
09-24 11:04:21.011: I/DEBUG(123):          bef984dc  00000000  
09-24 11:04:21.011: I/DEBUG(123):     #00  bef984e0  bef98500  [stack]
09-24 11:04:21.011: I/DEBUG(123):          ........  ........
09-24 11:04:21.011: I/DEBUG(123):     #01  bef984e0  bef98500  [stack]
09-24 11:04:21.011: I/DEBUG(123):          bef984e4  5da585d7  
09-24 11:04:21.011: I/DEBUG(123):          bef984e8  41056200  /dev/ashmem/dalvik-heap (deleted)
09-24 11:04:21.011: I/DEBUG(123):          bef984ec  40081a88  
09-24 11:04:21.011: I/DEBUG(123):          bef984f0  5d9d1000  
09-24 11:04:21.011: I/DEBUG(123):          bef984f4  00000000  
09-24 11:04:21.011: I/DEBUG(123):          bef984f8  00000000  
09-24 11:04:21.011: I/DEBUG(123):          bef984fc  40081a88  
09-24 11:04:21.011: I/DEBUG(123):          bef98500  bef98518  [stack]
09-24 11:04:21.011: I/DEBUG(123):          bef98504  5da589cb  
09-24 11:04:21.011: I/DEBUG(123):          bef98508  5d9d1034  
09-24 11:04:21.011: I/DEBUG(123):          bef9850c  5dec0988  
09-24 11:04:21.011: I/DEBUG(123):          bef98510  bef9852c  [stack]
09-24 11:04:21.011: I/DEBUG(123):          bef98514  bef9852c  [stack]
09-24 11:04:21.011: I/DEBUG(123):          bef98518  bef98558  [stack]
09-24 11:04:21.011: I/DEBUG(123):          bef9851c  5dd3543d  
09-24 11:04:21.011: I/DEBUG(123): memory near r2:
09-24 11:04:21.011: I/DEBUG(123):     12c03fe4 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.011: I/DEBUG(123):     12c03ff4 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.011: I/DEBUG(123):     12c04004 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.011: I/DEBUG(123):     12c04014 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.011: I/DEBUG(123):     12c04024 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.011: I/DEBUG(123):     12c04034 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.011: I/DEBUG(123):     12c04044 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.011: I/DEBUG(123):     12c04054 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.011: I/DEBUG(123):     12c04064 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.011: I/DEBUG(123):     12c04074 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.011: I/DEBUG(123):     12c04084 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.011: I/DEBUG(123):     12c04094 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.011: I/DEBUG(123):     12c040a4 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     12c040b4 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     12c040c4 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     12c040d4 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123): memory near r3:
09-24 11:04:21.021: I/DEBUG(123):     12c03fe0 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     12c03ff0 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     12c04000 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     12c04010 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     12c04020 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     12c04030 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     12c04040 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     12c04050 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     12c04060 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     12c04070 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     12c04080 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     12c04090 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     12c040a0 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     12c040b0 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     12c040c0 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     12c040d0 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123): memory near r4:
09-24 11:04:21.021: I/DEBUG(123):     5debf15c ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     5debf16c ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     5debf17c ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     5debf18c ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     5debf19c ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     5debf1ac ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     5debf1bc ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     5debf1cc ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     5debf1dc ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     5debf1ec ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     5debf1fc ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     5debf20c ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     5debf21c ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     5debf22c ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     5debf23c ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     5debf24c ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123): memory near r7:
09-24 11:04:21.021: I/DEBUG(123):     bef984c0 4007c018 00000000 00000004 40070f75  
09-24 11:04:21.021: I/DEBUG(123):     bef984d0 12c04001 5debf17c df0027ad 00000000  
09-24 11:04:21.021: I/DEBUG(123):     bef984e0 bef98500 5da585d7 41056200 40081a88  
09-24 11:04:21.021: I/DEBUG(123):     bef984f0 5d9d1000 00000000 00000000 40081a88  
09-24 11:04:21.021: I/DEBUG(123):     bef98500 bef98518 5da589cb 5d9d1034 5dec0988  
09-24 11:04:21.021: I/DEBUG(123):     bef98510 bef9852c bef9852c bef98558 5dd3543d  
09-24 11:04:21.021: I/DEBUG(123):     bef98520 4008171c 40081728 00000000 000082d2  
09-24 11:04:21.021: I/DEBUG(123):     bef98530 40081a88 5debf200 4007c568 00007f3e  
09-24 11:04:21.021: I/DEBUG(123):     bef98540 40078041 4007083f 40081a88 00000000  
09-24 11:04:21.021: I/DEBUG(123):     bef98550 00000001 00000001 400b4010 4006f275  
09-24 11:04:21.021: I/DEBUG(123):     bef98560 40081a88 00000001 41059e68 400710cf  
09-24 11:04:21.021: I/DEBUG(123):     bef98570 5c6b18d0 408509a7 00000000 41086e70  
09-24 11:04:21.021: I/DEBUG(123):     bef98580 0000006e bef985bc 00000006 408af1b0  
09-24 11:04:21.021: I/DEBUG(123):     bef98590 5c6b18d0 5c6b18d0 00000000 400b4020  
09-24 11:04:21.021: I/DEBUG(123):     bef985a0 bef985bc 41059e68 00000006 40d0abc0  
09-24 11:04:21.021: I/DEBUG(123):     bef985b0 00000000 40867921 40d0abd4 00000000  
09-24 11:04:21.021: I/DEBUG(123): memory near r9:
09-24 11:04:21.021: I/DEBUG(123):     408af190 00000000 00000000 00000000 00000000  
09-24 11:04:21.021: I/DEBUG(123):     408af1a0 00000000 00000000 00000000 00000000  
09-24 11:04:21.021: I/DEBUG(123):     408af1b0 40dd7898 40dd7888 00800000 10000000  
09-24 11:04:21.021: I/DEBUG(123):     408af1c0 04000000 00000000 00000000 3fe80000  
09-24 11:04:21.021: I/DEBUG(123):     408af1d0 00080000 00200000 00004000 00006000  
09-24 11:04:21.021: I/DEBUG(123):     408af1e0 00000001 00000101 00000002 00000001  
09-24 11:04:21.021: I/DEBUG(123):     408af1f0 00000000 00000000 00000000 00000002  
09-24 11:04:21.021: I/DEBUG(123):     408af200 00000000 4025a6ad 4025b0d9 00000000  
09-24 11:04:21.021: I/DEBUG(123):     408af210 4025a699 00000000 00000000 00000000  
09-24 11:04:21.021: I/DEBUG(123):     408af220 40dd7ac0 00000000 00000002 00000003  
09-24 11:04:21.021: I/DEBUG(123):     408af230 00000001 00000001 00010100 00000100  
09-24 11:04:21.021: I/DEBUG(123):     408af240 00000000 40dd79f8 00000003 00000000  
09-24 11:04:21.021: I/DEBUG(123):     408af250 40dd79e8 400b4db8 00000000 00000000  
09-24 11:04:21.021: I/DEBUG(123):     408af260 40dd7f60 50000ac6 4004a008 00000000  
09-24 11:04:21.021: I/DEBUG(123):     408af270 400b5c20 400b5c40 40dd81e8 40dd82a8  
09-24 11:04:21.021: I/DEBUG(123):     408af280 40dd8350 40dd83f8 40dd84a0 40dd8548  
09-24 11:04:21.021: I/DEBUG(123): memory near sl:
09-24 11:04:21.021: I/DEBUG(123):     40d0aba0 4105c078 410561e0 00000000 00000004  
09-24 11:04:21.021: I/DEBUG(123):     40d0abb0 41056268 41059ec0 41060818 40d0abf0  
09-24 11:04:21.021: I/DEBUG(123):     40d0abc0 40d0abf0 57cdafee 56cf1d68 00000006  
09-24 11:04:21.021: I/DEBUG(123):     40d0abd0 00000000 41056268 41059e68 40d0ac40  
09-24 11:04:21.021: I/DEBUG(123):     40d0abe0 57ce0bec 56cf2198 57cdafee 00000000  
09-24 11:04:21.021: I/DEBUG(123):     40d0abf0 57cb26da 56c384b8 57cb2706 00000000  
09-24 11:04:21.021: I/DEBUG(123):     40d0ac00 00000000 41056268 00000000 41059e68  
09-24 11:04:21.021: I/DEBUG(123):     40d0ac10 41058770 40d0ac40 40d0ac40 57ce0be4  
09-24 11:04:21.021: I/DEBUG(123):     40d0ac20 40e4af20 41060818 41059e68 40d0ac60  
09-24 11:04:21.021: I/DEBUG(123):     40d0ac30 5cb761ba 56c57958 57ce0bec 00000000  
09-24 11:04:21.021: I/DEBUG(123):     40d0ac40 40e4af20 41059e68 41060818 40d0ac80  
09-24 11:04:21.021: I/DEBUG(123):     40d0ac50 00000000 56f08530 5cb761ba 40d0ac94  
09-24 11:04:21.021: I/DEBUG(123):     40d0ac60 41057f50 41060818 4105c7a0 40d0ac94  
09-24 11:04:21.021: I/DEBUG(123):     40d0ac70 00000000 00000000 00000000 4105c780  
09-24 11:04:21.021: I/DEBUG(123):     40d0ac80 40d0ace0 5839375e 56f07040 5cb73902  
09-24 11:04:21.021: I/DEBUG(123):     40d0ac90 00000000 3fc00000 41060860 443c0000  
09-24 11:04:21.021: I/DEBUG(123): memory near sp:
09-24 11:04:21.021: I/DEBUG(123):     bef984c0 4007c018 00000000 00000004 40070f75  
09-24 11:04:21.021: I/DEBUG(123):     bef984d0 12c04001 5debf17c df0027ad 00000000  
09-24 11:04:21.021: I/DEBUG(123):     bef984e0 bef98500 5da585d7 41056200 40081a88  
09-24 11:04:21.021: I/DEBUG(123):     bef984f0 5d9d1000 00000000 00000000 40081a88  
09-24 11:04:21.021: I/DEBUG(123):     bef98500 bef98518 5da589cb 5d9d1034 5dec0988  
09-24 11:04:21.021: I/DEBUG(123):     bef98510 bef9852c bef9852c bef98558 5dd3543d  
09-24 11:04:21.021: I/DEBUG(123):     bef98520 4008171c 40081728 00000000 000082d2  
09-24 11:04:21.021: I/DEBUG(123):     bef98530 40081a88 5debf200 4007c568 00007f3e  
09-24 11:04:21.021: I/DEBUG(123):     bef98540 40078041 4007083f 40081a88 00000000  
09-24 11:04:21.021: I/DEBUG(123):     bef98550 00000001 00000001 400b4010 4006f275  
09-24 11:04:21.021: I/DEBUG(123):     bef98560 40081a88 00000001 41059e68 400710cf  
09-24 11:04:21.021: I/DEBUG(123):     bef98570 5c6b18d0 408509a7 00000000 41086e70  
09-24 11:04:21.021: I/DEBUG(123):     bef98580 0000006e bef985bc 00000006 408af1b0  
09-24 11:04:21.021: I/DEBUG(123):     bef98590 5c6b18d0 5c6b18d0 00000000 400b4020  
09-24 11:04:21.021: I/DEBUG(123):     bef985a0 bef985bc 41059e68 00000006 40d0abc0  
09-24 11:04:21.021: I/DEBUG(123):     bef985b0 00000000 40867921 40d0abd4 00000000  
09-24 11:04:21.021: I/DEBUG(123): code around pc:
09-24 11:04:21.021: I/DEBUG(123):     5da58460 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     5da58470 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     5da58480 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     5da58490 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     5da584a0 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     5da584b0 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     5da584c0 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     5da584d0 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     5da584e0 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     5da584f0 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     5da58500 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     5da58510 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     5da58520 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     5da58530 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     5da58540 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123):     5da58550 ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.021: I/DEBUG(123): code around lr:
09-24 11:04:21.021: I/ActivityManager(492): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=com.android.launcher/com.android.launcher2.Launcher} from pid 492
09-24 11:04:21.031: I/DEBUG(123):     00001fdc ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.031: I/DEBUG(123):     00001fec ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.031: I/DEBUG(123):     00001ffc ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.031: I/DEBUG(123):     0000200c ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.031: I/DEBUG(123):     0000201c ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.031: I/DEBUG(123):     0000202c ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.031: I/DEBUG(123):     0000203c ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.031: I/DEBUG(123):     0000204c ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.031: I/DEBUG(123):     0000205c ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.031: I/DEBUG(123):     0000206c ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.031: I/DEBUG(123):     0000207c ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.031: I/DEBUG(123):     0000208c ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.031: I/DEBUG(123):     0000209c ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.031: I/DEBUG(123):     000020ac ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.031: I/DEBUG(123):     000020bc ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.031: I/DEBUG(123):     000020cc ffffffff ffffffff ffffffff ffffffff  
09-24 11:04:21.031: I/DEBUG(123): memory map around fault addr 5da58480:
09-24 11:04:21.031: I/DEBUG(123):     5d8d2000-5d9d1000 
09-24 11:04:21.031: I/DEBUG(123):     (no map for address)
09-24 11:04:21.031: I/DEBUG(123):     bef78000-bef99000 [stack]

摘要:Delphi XE5 Android编译器只能用于构建XE5移动应用程序,而不能完全用于构建以Java加载的库吗?

Summa summarum: Can Delphi XE5 Android compiler only be used to build XE5 mobile applications, and not at all to build libraries that are loaded in Java?

对不起,该项目不是开源的,所以我不能包含源代码.

Sorry, the project is not open source, so I cannot include source code.

推荐答案

我自己花了几天时间后,我相信答案是.

After fiddling with it for days myself, I believe the answer is no.

文档非常清楚地说明了动态和静态移动共享库的不适用": http://docwiki.embarcadero.com/RADStudio/Seattle/en/Compiling_and_Building_Multi-Device_Applications

The documentation states pretty clearly "N/A" for mobile shared libraries, both dynamic and static: http://docwiki.embarcadero.com/RADStudio/Seattle/en/Compiling_and_Building_Multi-Device_Applications

在RAD Studio(我尝试过XE7,XE8和10.1 Berlin)中,库只能针对Windows和OSX.除非有一些未记录的方法可以这样做.

In RAD Studio (I tried XE7, XE8 and 10.1 Berlin), libraries can only be targeted at Windows and OS X. Unless there's some undocumented way to do it.

EDIT(针对Larry):表示XE的Delphi交叉编译器无法生成要在Android上随System.LoadLibrary加载的共享库.当然,假设XE5编译器不如其继任者.因此,它只能用于应用程序构建./EDIT

如果它不适用于FPC,则很可能根本就没有办法用Object Pascal或Delphi语言为Android创建共享库.虽然我很难相信.

If it doesn't work with FPC then it might well be that there simply is no way to create a shared library for Android in Object Pascal or Delphi language. Though I find that difficult to believe.

如果有人能证明我错了,我将非常高兴.

I'd be extremely happy if someone could prove me wrong.

编辑-这密切相关: delphi XE7 firemonkey android共享对象/要动态加载的库-模板

这篇关于Delphi XE5可以编译一个.so库,该库可以通过&amp;#39; System.loadLibrary在Java中加载吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-14 23:51