Closed Seladam closed 3 years ago
:octocat: cibot: Thank you for posting issue #646. The person in charge will reply soon.
First of all, we have to apologize confusion about gstreamer releated. we should have to delete the xml and gradle file. They don't need for this application.
I think you need to build nntrainer library for android first. Once you do ninja -C build
, it is built for x86_64 in build directory. So you cannot use it for android. In order to build libnntrainer.so library for android you need to use ndk-build.
If you do
cd ${NNTRAINER_ROOT}/jni
ndk-build
then you will have libnntrainer.so in ${NNTRAINER_ROOT}/libs/${TARGET_ARCH_ABI}/
and then
cd ${NNTRAINER_ROOT}/Applications/KNN/jni/
ndk-build
the you will have knn_sample
in ${NNTRAINER_ROOT}/Applications/KNN/libs/
I'm having issues with compiling the KNN project with Android Studio.
Preconditions:
Build Steps
**1. git clone https://github.com/nnstreamer/nntrainer
7. Download and extract Gstreamer from: https://gstreamer.freedesktop.org/data/pkg/android/1.18.0/gstreamer-1.0-android-universal-1.18.0.tar.xz 8. Download and extract Tensorflow-lite android resources from nnstreamer-android-resource repository: https://raw.githubusercontent.com/nnstreamer/nnstreamer-android-resource/master/external/tensorflow-lite-1.13.1.tar.xz 9. Set environment variables: 9.1. sudo -H gedit /etc/environment 9.2. Add variables in new lines:
**9.3. Save the file 9.4. Log out and log in to refresh the environment
11. Set the NDK location in the PRoject Settings 11.1 File -> Project Structure...
11.2 SDK Loacation -> Android NDK location: select the installed ndk path
12. Make Project
Results:
In the Android.mk file at line 42, there is a reference to libnntranier.so with a path which doesn't exist.
LOCAL_SRC_FILES := $(NNTRAINER_ROOT)/libs/$(TARGET_ARCH_ABI)/libnntrainer.so
I don't have any libs folder in the nntrainer folder after cloning and building the repo.What build command should I use to generate the libs folder? Or where should I look for it?
Notes:
LOCAL_SRC_FILES := $(NNTRAINER_ROOT)/Applications/utils/libs/$(TARGET_ARCH_ABI)/libapp_utils.so
Environment: