0

我正在使用此链接 https://github.com/kghost/ics-openvpn实现 VPN Clinet App 我已经实现了所有类和 ndk、jni 文件夹。但我收到以下错误。你能告诉我我哪里错了吗,我对 NDK 编程知之甚少。

java.lang.UnsatisfiedLinkError: com.android.tools.fd.runtime.IncrementalClassLoader$DelegateClassLoader[DexPathList[[dex file "/data/data/com.goyal.demovpn/files/instant-run/dex/slice-support-annotations-24.2.1_10cd953c940accdea77ebb67004f63b8f836c70e-classes.dex", dex file "/data/data/com.goyal.demovpn/files/instant-run/dex/slice-slice_9-classes.dex", dex file "/data/data/com.goyal.demovpn/files/instant-run/dex/slice-slice_8-classes.dex", dex file "/data/data/com.goyal.demovpn/files/instant-run/dex/slice-slice_7-classes.dex", dex file "/data/data/com.goyal.demovpn/files/instant-run/dex/slice-slice_6-classes.dex", dex file "/data/data/com.goyal.demovpn/files/instant-run/dex/slice-slice_5-classes.dex", dex file "/data/data/com.goyal.demovpn/files/instant-run/dex/slice-slice_4-classes.dex", dex file "/data/data/com.goyal.demovpn/files/instant-run/dex/slice-slice_3-classes.dex", dex file "/data/data/com.goyal.demovpn/files/instant-run/dex/slice-slice_2-classes.dex", dex file "/data/data/com.goyal.demovpn/files/instant-run/dex/slice-slice_1-classes.dex", dex file "/data/data/com.goyal.demovpn/files/instant-run/dex/slice-slice_0-classes.dex", dex file "/data/data/com.goyal.demovpn/files/instant-run/dex/slice-internal_impl-24.2.1_97c69303320b681f6d7d87eadc7fa921f02ff155-classes.dex", dex file "/data/data/com.goyal.demovpn/files/instant-run/dex/slice-internal_impl-24.2.1_8a18f2f1952aa425d384a1e33242b2e3b5e2451b-classes.dex", dex file "/data/data/com.goyal.demovpn/files/instant-run/dex/slice-internal_impl-24.2.1_67e7c6ea9a171280f91b75a018c8adc4f2583f0f-classes.dex", dex file "/data/data/com.goyal.demovpn/files/instant-run/dex/slice-internal_impl-24.2.1_5405f48ddd551053ab3c0faa550d0ec7f6f1ae3a-classes.dex", dex file "/data/data/com.goyal.demovpn/files/instant-run/dex/slice-internal_impl-24.2.1_48aecd695d9fdbb32686a2e497fcb23eaf97dcc2-classes.dex", dex file "/data/data/com.goyal.demovpn/files/instant-run/dex/slice-com.android.support-support-vector-drawable-24.2.1_015eb2a0704b5b24bf9edd7a8aa027b09e4eb25e-classes.dex", dex file "/data/data/com.goyal.demovpn/files/instant-run/dex/slice-com.android.support-support-v4-24.2.1_e542563c5b210b1167d539455a89614edf099333-classes.dex", dex file "/data/data/com.goyal.demovpn/files/instant-run/dex/slice-com.android.support-support-media-compat-24.2.1_01e8fb230f45ea3f0fb2e67b1d54b1f51a216412-classes.dex", dex file "/data/data/com.goyal.demovpn/files/instant-run/dex/slice-com.android.support-support-fragment-24.2.1_8cd128ce027a6fd9a390c47a9cc03e67f962b7ef-classes.dex", dex file "/data/data/com.goyal.demovpn/files/instant-run/dex/slice-com.android.support-support-core-utils-24.2.1_68e7b0016482a99658f41239a4ac0693d7b6cc38-classes.dex", dex file "/data/data/com.goyal.demovpn/files/instant-run/dex/slice-com.android.support-support-core-ui-24.2.1_0b4d927e6320c6127e3dd9e5e5befe04121bb575-classes.dex", dex file "/data/data/com.goyal.demovpn/files/instant-run/dex/slice-com.android.support-support-compat-24.2.1_872731fbcd26ccbf333b71659f8077f805fb1ae2-classes.dex", dex file "/data/data/com.goyal.demovpn/files/instant-run/dex/slice-com.android.support-appcompat-v7-24.2.1_14596ea6531416e72d0f833c11191aff4ba9f7f8-classes.dex", dex file "/data/data/com.goyal.demovpn/files/instant-run/dex/slice-com.android.support-animated-vector-drawable-24.2.1_9b888db785276461b4db8014854697864f2ecd31-classes.dex"],nativeLibraryDirectories=[/vendor/lib, /system/lib, /vendor/lib, /system/lib]]] couldn't find "libjni_openvpn.so"
                                                                      at java.lang.Runtime.loadLibrary(Runtime.java:366)
                                                                      at java.lang.System.loadLibrary(System.java:989)
                                                                      at com.goteso.demovpn.openvpn.OpenVpnService.<clinit>(OpenVpnService.java:508)
                                                                      at java.lang.reflect.Constructor.newInstance(Native Method)
                                                                      at java.lang.Class.newInstance(Class.java:1656)
                                                                      at android.app.ActivityThread.handleCreateService(ActivityThread.java:3094)
                                                                      at android.app.ActivityThread.access$1900(ActivityThread.java:168)
                                                                    at android.app.ActivityThread$H.handleMessage(Ac
4

1 回答 1

1

您是否先从 misc 文件夹运行 build-native.sh ?

  • 如果找不到 .git 文件,请按照说明更新您的子模块。
  • 如果找不到 ndk-build:将其添加到您的环境变量中。
  • 如果构建错误,请下载 ndk r12b。r13 和 r14 似乎破坏了构建。
于 2016-12-17T13:53:07.973 回答