This repository was archived by the owner on Nov 17, 2023. It is now read-only.
Replies: 1 comment 1 reply
-
Please try MXNet 1.8 or master branch |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
OS: Ubuntu 18.04 64bit LTS
Anaconda3-2019.03-Linux-x86_64
conda env used, Python: 3.6.8
Tried to build Android_armv7 using ci/build.py and sucess.
Use Android Studio.
Android.mk,
include $(CLEAR_VARS)
LOCAL_MODULE := mxnet_inference
LOCAL_SRC_FILES := $(LOCAL_PATH)/libs/libmxnet.so
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include/mxnet
include $(PREBUILT_SHARED_LIBRARY)
...
LOCAL_SHARED_LIBRARIES += mxnet_inference
include $(BUILD_SHARED_LIBRARY)
Application.mk
APP_ABI := armeabi-v7a
APP_PLATFORM := android-24
APP_STL := c++_static
NDK_TOOLCHAIN_VERSION := clang
APP_BUILD_SCRIPT := Android.mk
build.gradle
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.tistory.webnautes.useopencvwithndk_build"
minSdkVersion 21
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// ndk {
// abiFilters "armeabi-v7a"
// }
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
externalNativeBuild {
ndkBuild {
path 'src/main/jni/Android.mk'
}
}
packagingOptions {
// pickFirst 'lib/arm64-v8a/'
pickFirst 'lib/armeabi-v7a/'
// pickFirst 'lib/x86/'
// pickFirst 'lib/x86_64/'
}
}
error showed as follows:
#==================
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.tistory.webnautes.useopencvwithndk_build, PID: 12657
java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__aeabi_memcpy4" referenced by "/data/app/com.tistory.webnautes.useopencvwithndk_build-2/lib/arm/libmxnet.so"...
at java.lang.Runtime.loadLibrary(Runtime.java:372)
at java.lang.System.loadLibrary(System.java:1076)
at com.tistory.webnautes.useopencvwithndk_build.MainActivity.(MainActivity.java:48)
at java.lang.Class.newInstance(Native Method)
at android.app.Instrumentation.newActivity(Instrumentation.java:1095)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3083)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349)
at android.app.ActivityThread.access$1100(ActivityThread.java:221)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7224)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
I/Process: Sending signal. PID: 12657 SIG: 9
#=======================================
How to fix that? Thank you.
Beta Was this translation helpful? Give feedback.
All reactions