I'm trying to compile the Hello-jni sample but I still get this error :
*ERROR: You are using a non-Cygwin compatible Make program.
Currently using: C:/AndroidNDK/android-ndk-r8e/prebuilt/windows-x86_64/bin/make
To solve the issue, follow these steps:
1. Ensure that the Cygwin 'make' package is installed.
NOTE: You will need GNU Make 3.81 or later!
2. Define the GNUMAKE environment variable to point to it, as in:
export GNUMAKE=/usr/bin/make
3. Call 'ndk-build' again.*
First time I got this error, I found the issue about the space in the install directory (It was installed in c:\Program Files...). SoI moved it into C:/AndroidNDK/android-ndk-r8e/ but I still got the error. Then I tryed to re-install cygwin (with the make package), android-NDK but the error is always here !
When I echo the $CYGWIN_GNUMAKE I have this :
$ ndk-build NDK_LOG=1
HOST_OS=cygwin
HOST_ARCH=x86
HOST_TAG=cygwin-x86
GNUMAKE=/cygdrive/c/AndroidNDK/android-ndk-r8e/prebuilt/windows-x86_64/bin/make (system path)
CYGWIN_GNUMAKE=C:/AndroidNDK/android-ndk-r8e/build/core/check-cygwin-make.mk:43: Android.mk hello-jni.c Android NDK: C:/AndroidNDK/android-ndk-r8e/prebuilt/windows-x86_64/bin/make is not cygwin-compatible. Stop.
Cygwin-compatible GNU make detected
make: /cygdrive/c/AndroidNDK/android-ndk-r8e/build/core/build-local.mk: No such file or directory
make: *** No rule to make target `/cygdrive/c/AndroidNDK/android-ndk-r8e/build/core/build-local.mk'. Stop.
The strange thing is that here I have the message "Cygwin-compatible GNU make detected" but it still doesn't work. If somebody has an idea I would really appreciate, it has been two days now that I'm trying to fix it...
By the way, I'm a very beginner with linux shell :)
Thanks swetha kini for your help but, as I said, my directory's name does not contain space (ie. C:\AndroidNDK\android-ndk-r8e). Finally I found the issue : in the cygwin path "C:\AndroidNDK\android-ndk-r8e" was before "/usr/local/bin:/usr/bin:/bin", I just swap and now it works.
Related
I am trying to implement the MuPDF library in my Android project. When I execute ant debug it gives me the following error:
Buildfile:
C:\Users\Saket\AndroidStudioProjects\muPdf\mupdf\platform\android\viewer\build.xml
BUILD FAILED
C:\Users\AndroidNewBee\AndroidStudioProjects\muPdf\mupdf\platform\android\viewer\build.xml:83:
Cannot find
C:\Users\AndroidNewBee\AndroidStudioProjects\muPdf\mupdf\platform\android\viewer\UsersSaketAppDataLocalAndroidsdk\tools\ant\build.xml
imported from
C:\Users\AndroidNewBee\AndroidStudioProjects\muPdf\mupdf\platform\android\viewer\build.xml
Can anyone help me with this problem?
This path is clearly bogus:
C:\Users\AndroidNewBee\AndroidStudioProjects\muPdf\mupdf\platform\android\viewer\UsersSaketAppDataLocalAndroidsdk\tools\ant\build.xml
ie. the 'UsersSaketAppDataLocalAndroidsdk' part is obviously not going to work.
Check the setting of your ANDROID_HOME environment variable (try echo %ANDROID_HOME% from a cmd window), this is likely to be where the bad part is coming from.
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.
I've been trying to follow this sample on github to get a basic spotify implementation working, I've followed the setup steps, installed all the required libraries etc but keep getting the following error during the native build stage.
**** Build of configuration Default for project LoginActivity ****
c:\Android-ndk\android-ndk-r8e\ndk-build.cmd NDK_NO_WARNINGS=1 all
Install : libspotify.so => libs/armeabi/libspotify.so
c:/Android-ndk/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/arm-linux-androideabi-strip:./libs/armeabi/libspotify.so: File format not recognized
make: *** [libs/armeabi/libspotify.so] Error 1
make: *** Deleting file `libs/armeabi/libspotify.so'
**** Build Finished ****
I downloaded the android specific library, then tried various combinations of Linux ARM libraries just to see what would happen and the result is always the same. When removing libspotify.so from the directory the build fails as expected because the file can't be found so I know the script is trying to process the file.
As far as I can tell I've followed the setup to the letter, my current guess is that the problem is related to running a 64 bit version of eclipse/java etc. Can anyone shed any light on this issue?
You need to find out what is the compilable target of this file. If you use linux, run the following command:
$ file libspotify.so
You will see if it can compile with armeabi or x86. Then, in application.mk, you need to set up the APP_ABI to armeabi or APP_ABI:X86.
It turns out this issue was caused by a corrupt archive with the .so file.
When I re-downloaded it, it worked fine. Thanks for the assistance.
EDIT
I found a version of the libspotify.so file which had been extracted properly here.
I believe you may have accidentally extracted libspotify.so (21 bytes), which is only a Unix symlink to the shared library libspotify.so.12.1.51 (1,961,644 bytes).
At least that's what I had just done which led me here. The latter needs to be renamed to the lookup name (libspotify.so) and then NDK makes fine.
Hope this helps another tired soul, at least. :)
I know this may be possible duplicate of some questions. but answers for those threads are not helping me.
I am trying to compile ffmpeg library for android using Bambuser's ffmpeg.
I downloaded Archive for client versions 1.3.7 to 1.6.0. from bambuser.
I followed instruction given in REAME.
While running ./build.sh i came across following error
arm-linux-androideabi-gcc is unable to create an executable file.
C compiler test failed.
If you think configure made a mistake, make sure you are using the latest
version from SVN. If the latest version fails, report the problem to the
ffmpeg-user#mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.
Here are last few lines of config.log of ffmpeg
mktemp is /bin/mktemp
check_ld
check_cc
BEGIN /tmp/ffconf.qflVj27Q.c
1 int main(void){ return 0; }
END /tmp/ffconf.qflVj27Q.c
arm-linux-androideabi-gcc --sysroot=/home/chaitanya/android/android-ndk-r5b/platforms/android-8/arch-arm -c -o /tmp/ffconf.gc6um0Ki.o /tmp/ffconf.qflVj27Q.c
arm-linux-androideabi-gcc: error trying to exec 'cc1': execvp: No such file or directory
C compiler test failed.
in tmp i do not find any relative folder or file as per config.log says "ffconf.qflVj27Q.c".
I am doing this on
1. Ubuntu 11.10
2. OpenJDK 6
3. android-ndk-r5b
NOte:
I only have API-10 Installed in eclipse. (if it matters :D)
What could be the solution for this?
I finally found the problem with my setup when facing this same issue... Looking at the arm-build.sh script, I started following the script. Notice the "TOOLCHAIN=..." path.
Originally the path was:
TOOLCHAIN=echo $NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/*-x86
When I went to verify this path exists, I noticed that it did not.
I think the reason is that I have a 64-bit build.
My path is actually:
.../toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64
What I ended up doing was copying the folder, and renaming it to "linux-x86" and now all is compiling.
Hope this helps someone!
I also faced this problem this morning and tried solutions suggested for similar questions here. But none of the solutions worked for me.
But finally i solved it. In my case, it was problem with Android NDK package. My system is 64bit ubuntu and my ndk pkg was also linux-64bit. But when i used the ndk-linux-x86, this problem was solved. I hope that this might help someone else.
Hi I want help to work with android NDK.
I have set up my eclipse Helios to work with NDK with help of this tutorial. I am using windows. When trying to build I am shown this error
make[1]: Entering directory
`/cygdrive/d/WorkSpace/TestProject/TestProject'
/cygdrive/d/DevTools/android-ndk-r5b-windows/android-ndk-r5b/build/core/build-local.mk:39: build/core/init.mk: No such file or directory
make[1]: Leaving directory
`/cygdrive/d/WorkSpace/TestProject/TestProject'
/cygdrive/d/DevTools/android-ndk-r5b-windows/android-ndk-r5b/build/core/build-local.mk:76: *** missing `endif'. Stop.
make: *** [all] Error 2
It doesn't let me build my application.
How to solve this error?
EDIT : I have tried to build hello-jni application with the eclipse and cygwin but I couldn't build the program, it throws same error
I have got the mistake.... Actually the make command was older than the recommended version. That was the reason why none of the ndk was running properly. I have upgraded the make version and everything is running the way it should.... even that eclipse tutorial is running like a charm......
TIP: You may have that old cygwin with you... you may still find it useful which have make v 3.80.... upgrade it from internet for version 3.81 and it will work.