I am facing following two problems
1.Access is denied during ndk-build.
G:/AndroidApp/NativeCodes -> It has my native codes(c++) codes,when i try
to build this,it is compiling the source files and creating the lib but at last
i am getting *make.exe: *** Access is denied.. Stop.*
2.And when i launch eclipse i am getting following two error in
a) Android NDK: WARNING: There are no modules to build in this project!
b) G:\AdroidApp\Meddiff: **Permission denied**
NDK which i am using is, r10c 32 bit.
Problem solved by disabling antivirus.
I found an answer which worked for me on https://stackoverflow.com/a/17155381/1065835
A C file was opened in Eclipse and Beyond Compare. After I'd closed the latter, everything was build well.
My OS was Windows 8 (64-bit)
Related
In Ubuntu 16.04, when running an Android Tensorflow TFDetect implementation using my protobuf file, I received an error stating "No OpKernel was registered to support Op 'ceil'". I had to modify the mobile build to include the proper .cc files and I then proceeded to run the following command to build the jar after rebuilding Tensorflow:
bazel build -c opt
//tensorflow/contrib/android:libtensorflow_inference.so
--crosstool_top=//external:android/crosstool --host_crosstool_top=#bazel_tools//tools/cpp:toolchain --cpu=armeabi-v7a
I then receive the error stating that the build was not complete due to stdlib.h missing:
In file included from
external/androidndk/ndk/sources/cxx-stl/gnu-libstdc++/4.9/include/algorithm:62:
In file included from
external/androidndk/ndk/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/stl_algo.h:59:
external/androidndk/ndk/sources/cxx-stl/gnu-libstdc++/4.9/include/cstdlib:72:10:
fatal error: 'stdlib.h' file not found
I see many others being told to use the prebuilt binaries, but this will not work for me as I need some additional kernels that are stripped for mobile.
Anyone have any ideas as to how I can build the necessary android jar?
Well I found the issue. At the following link below it states that bazel is not supported by NDK version 16. I had originally installed 14b, but at one point when I opened my project in Android Studio, it asked to update the NDK and I upgraded. When I happened to be troubleshooting this issue I noticed that it was version 16 and then ended up removing that and installing version 14. After rebuilding all source and then performing the above call to bazel, everything went through smoothly. Stupid mistake on my part.
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/android/README.md
I have this error when I trying to run Wikitude examples. How can I solve this.
Error:error: C:/Users/se/Desktop/wwww/Examples/SDKExamples/plugins/src/main/cpp/jni/../lib/x86/libippicv.a(jmp_icvippiMulC_32f_C1IR_as.s.o): relocation R_386_GOTOFF against preemptible symbol icv_ippJumpIndexForMergedLibs cannot be used when making a shared object
Error:error: linker command failed with exit code 1 (use -v to see invocation)
I have the same error, sorry can't add a comment as don't have enough reputation.
Error:error: /Users/alex/Projects/Android/docsign/opencv/src/sdk/native/3rdparty/libs/x86/libippicv.a(jmp_icvippiTranspose_32s_C4IR_as.s.o): relocation R_386_GOTOFF against preemptible symbol icv_ippJumpIndexForMergedLibs cannot be used when making a shared object
This is the latest Android Studio and NDK, and I am using OpenCV,
Android Studio 3.0.1
NDK 16.0.4442984
This does not happen on my other machine which does not have NDK updated.
Update:
The guys maintaining the OpenCV for android advised me to add the following line to the CMake file in order to avoid the errors, when compiling with new NDK.
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--exclude-libs,libippicv.a -Wl,--exclude-libs,libippiw.a")
https://github.com/opencv/opencv/issues/10229#issuecomment-370326899
I've had the exact same problem, but think I have found a work-around to this problem. I think the problem lies in the newer version of NDK, so you could try to re-install it.
Go to SDK Manager and navigate to Appearance & Behavior/System Settings/Android SDK.
In the tab menu choose SDK Tools and deselect the NDK checkbox -> Apply. After uninstalling -> mark NDK and Apply again.
Also, after installing NDK, remove the build folder in your project (only the one with the intermediates folder in it).
Your errors will still occur when you Make the project, but your code will run when you hit Debug.
This work-around worked for me, so I hope this works for you too.
The wikitude Android samples will not currently build with Android NDK 16. You need to downgrade your Android NDK to 14.
Alternatively you can just remove the plugins features from the build. To do this remove the include for ':plugins' from the settings.gradle file and the lines referencing ':plugins' in the main build.gradle.
I'm relatively new to Android and I have a problem using the ndk-build command.
I use the NDK r9d under Windows 7 64bits.
When I run my build system which creates my Android project (makefiles etc...) and then creates a process running ndk-build.cmd (I checked that it is call in the Android project) I get the error:
make.exe: *** create_child_process: DuplicateHandle(In) failed (e=6)
But when I run ndk-build.cmd "manually" in the windows command console in the same Android project created by my build system (or any Android project) everything is working.
I did find some related questions like here:
https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014825836
https://cygwin.com/ml/cygwin/2004-09/msg01506.html
But all I found says either that it's a problem of make version which is not (I think) since ndk-build works fine when I use it "manually" or it says that it is related to stdin handling and again I don't think that the issue here. Plus all the anwsers that I found was related to a similar error but not exactly the same:
process_easy: DuplicateHandle(In) failed (e=6)
Maybe someone knows the meaning of my error message. I don't think that's specific to Android ndk-build but maybe.
Thank you for reading (and sorry for any english mistakes, I am french and not fluent in english)
Finaly, I found a solution to my problem here:
http://www.zeusedit.com/zforum/viewtopic.php?t=174
I am not sure about what the problem was but according to this link, it was related to the make environment and the handles.
The solution : Instead of using the createProcess function (from Windows) directly to call ndk-build.cmd, I created a batch file containing:
start ndk-build.cmd
And I called this batch (.bat) via the createProcess function.
I let you see the link for more details.
First, I already read 3 or 4 tutorials, 20 related questions on stack overflow, I am desperate, nothing seems to work...
I run on mac os x, on eclipse juno, ndk-r8
I try to debug an application (.apk) that use a library (.jar), that use many native library (.so).
My 2 AndroidManifest.xml contains debuggable=true, i compile the .so with "ndk-build NDK_DEBUG=1"
but when i call "ndk-gdb", on the application directory, I get:
"ERROR: Could not find gdbserver binary under ./libs/none"
(which seems normal)
and in the library directory, i get:
"ERROR: Non-debuggable application installed on the target device."
(which is false)
when my program crash with a segv, if I use addr2line or ndk-stack, both says that my address is incorrect.
does anyone as an idea why gdb cannot attach to my process ? or have a workaround to do this ?
As I said earlier in comments:
ndk-gdb cannot attach to a process where the jni is inside an android library project.
As a workaround, you can put a mock main entry point in the library,
to transform it into a executable project, to execute it in debug mode.
I have checked a lot of threads already but none of them seems to solve my problem. I'm working on a project regarding my study and want to use the OpenCV library with my Android app. Here is a list of the programs and tools I use:
Eclipse IDE for Java Developers (3.7.0)
Android SDK r16
OpenCV 2.3.1
Android NDK r7b
I am following a tutorial, and everything works fine until the part where I need the NDK for using C++ OpenCV code. I can code and run Android apps and the "Tutorial 1" samples from the OpenCV 2.3.1 are working fine. However the "Tutorial 2" samples won't work. I tried following the steps in the C++ part of the tutorial.
When I try to run the NDK-build (tried both the command line and Eclipse part) I keep getting this error:
/usr/bin/sh: -c: line 1: syntax error: unexpected end of file
make: *** [obj/local/armeabi/objs/opencv/cvjni.o] Error 1
Does anyone has a solution for my problem? Thanks in advance
in bash script unexpected "syntax error: unexpected end of file" on if statement
Make sure your shell scripts use Unix-style line endings