Android Problem Collection 40: Android Ndk:could not find application project directory

Source: Internet
Author: User

Remember the former compiled so library directly using Ndk-build, today using the error is as follows:

notdirectory !    thevariabletotoit.    /opt/android-ndk-r10b/build/core/build-local.mk:148: *** Android NDK: Aborting    .  Stop.

An expert's weapon is as follows:

You need toSpecify3Things. Ndk_project_path- theLocation ofYour PROJECTNDK_APPLICATION_MK- thePath of  theApplication.mkfileApp_build_script- thePath to  theAndroid.mkfileThese is needed toOverride theDefault values of  theBuild script, which expects things toBeinch  theJnifolder. When calling Ndk-build Usendk-build ndk_project_path=/path/ to/proj ndk_application_mk=/path/ to/application.mkin application.mkAddApp_build_script: =/path/ to/android.mk

First step, add android.mk path in application
For example, these two files are siblings:

APP_BUILD_SCRIPT := Android.mk

The second step is to compile directly:

$ Ndk-buildNdk_project_path=.NDK_APPLICATION_MK=Application. mk[armeabi-v7a]Compile++Thumb:Detection_and_recognition_lib <=detectionandrecognition. cpp[armeabi-v7a]prebuilt       :Libopencv_java.so <=/home/linc/workspace/lab/OPENCV-ANDROID-SDK-2.4.11/SDK/native/jni/.. /libs/armeabi-v7a/[ARMEABI-V7A]sharedlibrary  :libdetection_and_recognition_lib.so/opt/android-ndk-r10b/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/. /lib/gcc/arm-linux-androideabi/4.6/.. /.. /.. /.. /arm-linux-androideabi/bin/LD: Warning:Hidden symbol' __aeabi_atexit ' inch/opt/android-ndk-r10b/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a/thumb/LIBGNUSTL_STATIC.A (ATEXIT_ARM.O) is referenced by DSO./obj/local/armeabi-V7A/LIBOPENCV_JAVA.SO[ARMEABI-V7A]Install        :libdetection_and_recognition_lib.so = libs/armeabi-v7a/libdetection_and_recognition_lib.so[armeabi-v7a]prebuilt       :Libnative_camera_r4.3.0. So <=/home/linc/workspace/lab/OPENCV-ANDROID-SDK-2.4.11/SDK/native/jni/.. /libs/armeabi-v7a/[ARMEABI-V7A]Install        :Libnative_camera_r4.3.0. so = Libs/armeabi-v7a/libnative_camera_r4.3.0. so[armeabi-v7a]prebuilt       :Libnative_camera_r4.4.0. So <=/home/linc/workspace/lab/OPENCV-ANDROID-SDK-2.4.11/SDK/native/jni/.. /libs/armeabi-v7a/[ARMEABI-V7A]Install        :Libnative_camera_r4.4.0. so = Libs/armeabi-v7a/libnative_camera_r4.4.0. so[armeabi-v7a]Install        :libopencv_java.so = libs/armeabi-v7a/libopencv_java.so[x86]Compile++:Detection_and_recognition_lib <=detectionandrecognition. cpp[x86]prebuilt       :Libopencv_java.so <=/home/linc/workspace/lab/OPENCV-ANDROID-SDK-2.4.11/SDK/native/jni/.. /libs/x86/[x86]sharedlibrary  :Libdetection_and_recognition_lib.so[x86]Install        :libdetection_and_recognition_lib.so = libs/x86/libdetection_and_recognition_lib.so[x86]prebuilt       :Libnative_camera_r4.3.0. So <=/home/linc/workspace/lab/OPENCV-ANDROID-SDK-2.4.11/SDK/native/jni/.. /libs/x86/[x86]Install        :Libnative_camera_r4.3.0. so = Libs/x86/libnative_camera_r4.3.0. so[x86]prebuilt       :Libnative_camera_r4.4.0. So <=/home/linc/workspace/lab/OPENCV-ANDROID-SDK-2.4.11/SDK/native/jni/.. /libs/x86/[x86]Install        :Libnative_camera_r4.4.0. so = Libs/x86/libnative_camera_r4.4.0. so[x86]Install        :libopencv_java.so = libs/x86/libopencv_java.so

You may have seen the prawns, I am compiling OPENCV related projects. Now the device selection has covered the x86 architecture, so compile to choose x86 instruction set compilation. The following are noted in the APPLICATION.MK:

APP_ABI := armeabi-v7a x86

Reference:
Http://stackoverflow.com/questions/14156596/ndk-cant-find-the-application-directory

Android Problem Collection 40: Android Ndk:could not find application project directory

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.