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.
Related
I cloned the Tensorflow Android example from https://github.com/tensorflow/tensorflow/tree/master/tensorflow/examples/android/, followed the steps at https://bazel.build/versions/master/docs/install-ubuntu.html to build it, but ran into problems with the following error:
tensorflow/core/kernels/split_v_op.cc:172:12: note: in instantiation of member function 'tensorflow::SplitVOpCPU::Compute' requested here
explicit SplitVOpCPU(OpKernelConstruction* c) : Base(c) {}
The build command that I used is:
sudo bazel build --genrule_strategy=standalone --spawn_strategy=standalone --local_resources 4096,4.0,1.0 -j 1 -c opt //tensorflow/examples/android:tensorflow_demo
please share ideas to fix this issue.
The issue is similar to the one posted at
https://github.com/tensorflow/tensorflow/issues/8641#issuecomment-288586320
The bazel builder does not work with latest NDK build that comes with Android Studio.
Need to use NDK r12b in the WORKSPACE file.
Code could be compiled, but still spilled out the warnings...
I'm trying to compile Mupdf. I followed the steps given in the mupdf documentation:
http://www.mupdf.com/docs/how-to-build-mupdf-for-android
But I'm getting a error at this step:
~/src/mupdf/platform/android $ ndk-build -ndk-build: command not found
I have installed ndk-10. And I have given the path in eclipse. I followed below steps to give ndk path.
Window->Preferences->Android->ndk and i gave the path. But I'm not able to complete mupdf compilation. I'm not able to understand, what might have gone wrong. Is anyone facing a similar issue?
Thanks in advance..
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.
i have installed android sdk and downloaded the latest version of phonegap 2.5.0 in fedora 18.
i am trying to create a project using the following command
./create ~/Desktop/android-project com.example.android android_project
am getting the following error.
which: no android in (/sbin:/bin:/usr/sbin:/usr/bin)
An unexpected error occurred: ANDROID_BIN="${ANDROID_BIN:=$( which android )}" exited with 1
need your valuable suggestions.
finally found the answer
After checking my .bash_profile paths, and a bunch of digging, I finally found the cause of the issue. If you open up the create file (phonegap-2.5.0/lib/android/bin/create), there is a line that lists ANDROID_BIN=”${ANDROID_BIN:=$( which android )}”. The “which android” is the cause of the issue (or at least it seemed to be in my case). If you replace this line with the full path to your android tools (as listed below) it should resolve the issue. My final line looked like this:
ANDROID_BIN=/Users/ktyacke/DEV/adt-bundle-mac-x86_64-20130219/sdk/tools/android
The message you have means the phonegap script cannot find the android binary, which is included in the SDK you downloaded. Add the binary's directory, as well as the android tool's directory, to your path defined in ~/.bash_profile or any other location you're initializing the shell's environment variables.
Hello guys I'm trying to learn about openCV in android
I've already following the instruction given here
but when I'm trying to compile I'm only getting
01:50:14 ** Auto Build of configuration Default for project
org.opencv.samples.fd.FdActivity **
"C:\Android\android-ndk-r8\ndk-build.cmd" Install:
libdetection_based_tracker.so =>
libs/armeabi-v7a/libdetection_based_tracker.so
01:50:14 Build Finished (took 184ms)
in the console
and I'm also get an error
Errors occurred during the build. Errors running builder 'CDT Builder'
on project 'org.opencv.samples.fd.FdActivity'. Internal error building
project org.opencv.samples.fd.FdActivity configuration Default
java.lang.NullPointerException Internal error building project
org.opencv.samples.fd.FdActivity configuration Default
java.lang.NullPointerException
anyone ever encountered this problem before?
please help me to solve this problem
thank you
try
Project Properties>C/C++ Build>Tool Chain Editor
Current toolchain: Android GCC
Current builder: Android Builder
Project Properties>C/C++ Build
(uncheck) use default build command
Build command: ndk-build
(uncheck) generate Makefiles automatically
You may have renamed the project, and the eclipse forgot to rename the "Refresh Policy".
Just update "Project properties -> C/C++ Build -> Refresh Policy" manually solved my problem.
BTW, ADT has some very bad error descriptions as of in this case.
I might have the same problem,
try ndk-build -B which rebuild all the things, see whether you still got error,
if no error remain, there is no problem with your ndk-build. try to run your android apps without CDT installed, if this works, at least we could use comand line to build the c++ part of code.
but CDT is still not working well, after I install the CDT according to the opencv doc, I got lots of errors, add the cygwin and gcc things to the path would solved most of it. But the last things every strange is, I got an error here.
in the face detection sample, .cpp part
catch(cv::Exception e)
{
LOGD("nativeCreateObject catched cv::Exception: %s", e.what());
it always says symbol "e" can not be resolved.
but no error when I include the opencv things.
even when I try to put cv::Exception e outside of the catch()
These works for me:
Build command: ndk-build
(uncheck) generate Makefiles automatically