Closed mohdsaleem987 closed 6 years ago
From the root of the repository you need to navigate into the android/
directory and run build.sh https://github.com/artoolkitx/artoolkit5/blob/master/android/build.sh
environment variable NDK
needs to be set to your NDK installation: https://github.com/artoolkitx/artoolkit5/blob/master/android/build.sh#L143
Hello Sir,
Thank for the corporation,
I found new problem when i run build.sh in widows
jni/../../lib/SRC/ARUtil/nftw.c:75:9: warning: implicit declaration of function 'fts_open' is invalid in C99 [-Wimplicit-function-declaration]
ftsp = fts_open(paths, ftsflags, NULL);
^
jni/../../lib/SRC/ARUtil/nftw.c:75:7: warning: incompatible integer to pointer conversion assigning to 'FTS ' from 'int' [-Wint-conversion]
ftsp = fts_open(paths, ftsflags, NULL);
^ ~~~~~~~
jni/../../lib/SRC/ARUtil/nftw.c:79:16: warning: implicit declaration of function 'fts_read' is invalid in C99 [-Wimplicit-function-declaration]
while ((cur = fts_read(ftsp)) != NULL) {
^
jni/../../lib/SRC/ARUtil/nftw.c:79:14: warning: incompatible integer to pointer conversion assigning to 'FTSENT ' (aka 'struct _ftsent *') from 'int' [-Wint-conversion]
while ((cur = fts_read(ftsp)) != NULL) {
^ ~~~~~~
jni/../../lib/SRC/ARUtil/nftw.c:123:9: warning: implicit declaration of function 'fts_close' is invalid in C99 [-Wimplicit-function-declaration]
(void) fts_close(ftsp);
Please reply as soon as possible Thank you sir
Hello sir i also found this error message when i run the build.sh in window 10
[arm64-v8a] Compile : ar2 <= imageSet.c [arm64-v8a] Compile : ar2 <= jpeg.c [arm64-v8a] Compile : ar2 <= marker.c [arm64-v8a] Compile : ar2 <= matching.c [arm64-v8a] Compile : ar2 <= matching2.c clang.exe: error: unable to execute command: Couldn't execute program 'D:\sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe': Access is denied. (0x5) process_begin: CreateProcess(D:\sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe, D:/sdk/ndk-bundle/build//../toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -MMD -MP -MF ./obj/local/arm64-v8a/objs/ar2///lib/SRC/AR2/matching.o.d -gcc-toolchain D:/sdk/ndk-bundle/build//../toolchains/aarch64-linux-android-4.9/prebuilt/windows-x86_64 -target aarch64-none-linux-android -ffunction-sections -funwind-tables -fstack-protector-strong -fpic -Wno-invalid-command-line-argument -Wno-unused-command-line-argument -no-canonical-prefixes -g -O2 -DNDEBUG -Ijni/../../include/android -Ijni/../../include -Ijni -DANDROID -D__ANDROID_API=21 -Wa,--noexecstack -Wformat -Werror=format-security --sysroot D:/sdk/ndk-bundle/build//../sysroot -isystem D:/sdk/ndk-bundle/build//../sysroot/usr/include/aarch64-linux-android -c jni/../../lib/SRC/AR2/matching.c -o ./obj/local/arm64-v8a/objs/ar2///lib/SRC/AR2/matching.o, ...) failed. make (e=5): Access is denied. make: *** [obj/local/arm64-v8a/objs/ar2///lib/SRC/AR2/matching.o] Error 5 make: Waiting for unfinished jobs.... make: [obj/local/arm64-v8a/objs/ar2//__/lib/SRC/AR2/marker.o] Error 1
build.sh is a bash script. It won't run on Linux from the command line. You need to use git-bash or Linux-Subsystem-For-Windows. I normally use git-bash. But for that one haven't tried as I'm working on mac and Linux.
Hello sir, I run this on windows,I can run this on git bash software By the command bash build.sh
you open Git Bash
type this line ./build.sh
and hit enter
k thanks for support how to this code use in ubuntu android studio
Hello sir, I found this error after follow this link https://github.com/artoolkitx/artoolkit5/issues/120 I set APP_ABI := armeabi-v7a for all application.mk as well android-arwrapper.mk file but i found this error Android NDK: Check that jni/../obj/local/arm64-v8a/libarutil.a exists or that its path is correct which: no ndk-build in (/c/Users/saleema/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/usr/bin:/mingw64/bin:/usr/bin:/c/Users/saleema/bin:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Program Files/TortoiseSVN/bin:/c/Program Files (x86)/Windows Imaging:/cmd:/c/Users/saleema/AppData/Local/Microsoft/WindowsApps:/d/sdk/platform-tools:/usr/bin/vendor_perl:/usr/bin/core_perl) Android-ARWrapper.mk Start ARWrapper build (x86_64 release) Android NDK: ERROR:D:/sdk/ndk-bundle/build//../sources/android/support/Android.mk:ar2: LOCAL_SRC_FILES points to a missing file Android NDK: Check that jni/../obj/local/x86_64/libar2.a exists or that its path is correct Android NDK: ERROR:D:/sdk/ndk-bundle/build//../sources/android/support/Android.mk:kpm: LOCAL_SRC_FILES points to a missing file Android NDK: Check that jni/../obj/local/x86_64/libkpm.a exists or that its path is correct Android NDK: ERROR:D:/sdk/ndk-bundle/build//../sources/android/support/Android.mk:argsub_es: LOCAL_SRC_FILES points to a missing file Android NDK: Check that jni/../obj/local/x86_64/libargsub_es.a exists or that its path is correct Android NDK: ERROR:D:/sdk/ndk-bundle/build//../sources/android/support/Android.mk:armulti: LOCAL_SRC_FILES points to a missing file Android NDK: Check that jni/../obj/local/x86_64/libarmulti.a exists or that its path is correct Android NDK: ERROR:D:/sdk/ndk-bundle/build//../sources/android/support/Android.mk:ar: LOCAL_SRC_FILES points to a missing file Android NDK: Check that jni/../obj/local/x86_64/libar.a exists or that its path is correct Android NDK: ERROR:D:/sdk/ndk-bundle/build//../sources/android/support/Android.mk:aricp: LOCAL_SRC_FILES points to a missing file Android NDK: Check that jni/../obj/local/x86_64/libaricp.a exists or that its path is correct Android NDK: ERROR:D:/sdk/ndk-bundle/build//../sources/android/support/Android.mk:arvideo: LOCAL_SRC_FILES points to a missing file Android NDK: Check that jni/../obj/local/x86_64/libarvideo.a exists or that its path is correct Android NDK: ERROR:D:/sdk/ndk-bundle/build//../sources/android/support/Android.mk:arutil: LOCAL_SRC_FILES points to a missing file Android NDK: Check that jni/../obj/local/x86_64/libarutil.a exists or that its path is correct which: no ndk-build in (/c/Users/saleema/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/usr/bin:/mingw64/bin:/usr/bin:/c/Users/saleema/bin:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Program Files/TortoiseSVN/bin:/c/Program Files (x86)/Windows Imaging:/cmd:/c/Users/saleema/AppData/Local/Microsoft/WindowsApps:/d/sdk/platform-tools:/usr/bin/vendor_perl:/usr/bin/core_perl) Android-ARWrapper.mk Start ARWrapper build (mips64 release) Android NDK: ERROR:D:/sdk/ndk-bundle/build//../sources/android/support/Android.mk:ar2: LOCAL_SRC_FILES points to a missing file Android NDK: Check that jni/../obj/local/mips64/libar2.a exists or that its path is correct Android NDK: ERROR:D:/sdk/ndk-bundle/build//../sources/android/support/Android.mk:kpm: LOCAL_SRC_FILES points to a missing file Android NDK: Check that jni/../obj/local/mips64/libkpm.a exists or that its path is correct Android NDK: ERROR:D:/sdk/ndk-bundle/build//../sources/android/support/Android.mk:argsub_es: LOCAL_SRC_FILES points to a missing file Android NDK: Check that jni/../obj/local/mips64/libargsub_es.a exists or that its path is correct Android NDK: ERROR:D:/sdk/ndk-bundle/build//../sources/android/support/Android.mk:armulti: LOCAL_SRC_FILES points to a missing file Android NDK: Check that jni/../obj/local/mips64/libarmulti.a exists or that its path is correct Android NDK: ERROR:D:/sdk/ndk-bundle/build//../sources/android/support/Android.mk:ar: LOCAL_SRC_FILES points to a missing file Android NDK: Check that jni/../obj/local/mips64/libar.a exists or that its path is correct Android NDK: ERROR:D:/sdk/ndk-bundle/build//../sources/android/support/Android.mk:aricp: LOCAL_SRC_FILES points to a missing file Android NDK: Check that jni/../obj/local/mips64/libaricp.a exists or that its path is correct Android NDK: ERROR:D:/sdk/ndk-bundle/build//../sources/android/support/Android.mk:arvideo: LOCAL_SRC_FILES points to a missing file Android NDK: Check that jni/../obj/local/mips64/libarvideo.a exists or that its path is correct Android NDK: ERROR:D:/sdk/ndk-bundle/build//../sources/android/support/Android.mk:arutil: LOCAL_SRC_FILES points to a missing file Android NDK: Check that jni/../obj/local/mips64/libarutil.a exists or that its path is correct
after this previous error i found this error
make: [obj/local/armeabi/libARWrapper.so] Error 1 make: Waiting for unfinished jobs.... make: [obj/local/x86/libARWrapper.so] Error 1 [mips] SharedLibrary : libARWrapper.so jni/../../lib/SRC/ARUtil/nftw.c:75: error: undefined reference to 'fts_open' jni/../../lib/SRC/ARUtil/nftw.c:79: error: undefined reference to 'fts_read' jni/../../lib/SRC/ARUtil/nftw.c:79: error: undefined reference to 'fts_read' jni/../../lib/SRC/ARUtil/nftw.c:123: error: undefined reference to 'fts_close' clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation) make: [obj/local/armeabi-v7a/libARWrapper.so] Error 1 clang++.exe: error: no such file or directory: 'jni/../obj/local/mips/libar.a' clang++.exe: error: no such file or directory: 'jni/../obj/local/mips/libar2.a' clang++.exe: error: no such file or directory: 'jni/../obj/local/mips/libkpm.a' clang++.exe: error: no such file or directory: 'jni/../obj/local/mips/libargsub_es.a' clang++.exe: error: no such file or directory: 'jni/../obj/local/mips/libarmulti.a' clang++.exe: error: no such file or directory: 'jni/../obj/local/mips/libaricp.a' clang++.exe: error: no such file or directory: 'jni/../obj/local/mips/libarvideo.a' clang++.exe: error: no such file or directory: 'jni/../obj/local/mips/libarutil.a' make: *** [obj/local/mips/libARWrapper.so] Error 1
which commands are you running? As mentioned the native build won't work
i am using ./build in window command prompt into the main directory of build.sh.
You need to use Git-Bash or similar to run build.sh as it is a shell script which is not understood by the Windows command. The build.bat (if it is still there) is untested.
Hello Sir,
Thanks for the your help you given to me.As you suggest to our previous conversation you tell me that i am run this command
you open Git Bash type this line ./build.sh and hit enter
After run this command the error is come.
So please tell what i can do because i using the window 10 system.
@mohdsaleem987 above you list two different errors. Which of the two is still present? Otherwise, would you consider switching to artoolkitx? https://github.com/artoolkitx/artoolkitx
both error is come from when we run build.sh file gitbash
Have you installed Android SDK and the Android NDK on your system? What version do your SDK and NDK have? Which System are you running on? Mac, Windows, Linux? Is the SDK and NDK part of your PATH on this system?
Android sdk version 26 Latest Ndk windows 10 yes i have set sdk as well ndk path in system environmentals settings
Hello Sir,I am new in ar toolkit , I just downlaod the project & import in studio when i compile & run the app it's crashes and provide this log cat.Please Help me to solved out
03-21 17:33:57.473 3826-3826/? E/AndroidRuntime: FATAL EXCEPTION: main Process: org.artoolkit.ar.samples.NftSimple, PID: 3826 java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/org.artoolkit.ar.samples.NftSimple-1/base.apk"],nativeLibraryDirectories=[/data/app/org.artoolkit.ar.samples.NftSimple-1/lib/x86, /system/lib, /vendor/lib]]] couldn't find "libc++_shared.so" at java.lang.Runtime.loadLibrary0(Runtime.java:984) at java.lang.System.loadLibrary(System.java:1530) at org.artoolkit.ar.samples.nftSimple.nftSimpleActivity.(nftSimpleActivity.java:87)
at java.lang.Class.newInstance(Native Method)
at android.app.Instrumentation.newActivity(Instrumentation.java:1078)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2557)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Thanks you