I am trying to learn Android NDK using the Android NDK Beginners Guide book, when I came upon this step in chapter 2 to compile the hello-jni file. I can't figure out how to connect my Android dev device to cygwin teminal...can anyone help?
The step after this one in the book is ant install, and when I try that command the build fails. I'm assuming it's because I haven't connect the device to cygwin.
The NDK is available for Windows, you don't need Cygwin, if this book is telling you to use Cygwin: switch to a better book!
http://developer.android.com/tools/sdk/ndk/index.html
Related
I try to build v8 for android on mac. My steps are below :
Install depot_tools
fetch v8
cd v8
git checkout branch-name (last stable version for android)
echo "target_os = ['android']" >> ../.gclient && gclient sync --nohooks
make android_arm.release android_ndk_root=[full path to ndk]
It says that
no archive symbol table (run ranlib)
I search this issue. There is a bug for this state. But it is not solved yet.
I try to create d8 and push the android device. How can I do it?
EDIT
v8 guide provides building with GN.
I pass the ndk-root path using gn gen out.gn/arm.release/ --args='is_debug=false android_ndk_root="/path/android-ndk" target_os="android" arm_arch="armv7-a" android_sdk_root="/path/android-sdk-r25" v8_static_library=true android_ndk_version="r11b"'
Then I run ninja -C out.gn/arm.release/, the error is below :
ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/libgcc.a', needed by 'obj/libv8_base.a', missing and no known rule to make it
That is right. Because my libgcc under 4.9 folder not 4.9.x. How can I set libgcc path?
The up-to-date build instructions are at https://github.com/v8/v8/wiki/Cross-compiling-for-ARM. Anything that says "make android_arm" is outdated.
However, I don't know if building for Android on Mac is supported. It definitely works on Linux (so you could try in a VM). If something doesn't work, and you want to make it work, we'd happily accept patches; see https://github.com/v8/v8/wiki/Contributing.
you do not need to set ANDROID_NDK.
step 5:"target_os = ['android']" >> ../.gclient && gclient sync" will download ndk to "third_party/android_tools/ndk"
ndk_version must >= 12.b
We integrated V8 to Skype for Android and open-sourced the docker build script:
https://github.com/Microsoft/v8-docker-buildscript
Feel free to re-use it. It is not completely fair solution, but it is reproducible build on any OS.
V8 team supports Linux build infrastructure also it is well documented.
We succeed building it on Mac but found it too hard to maintain in working condition. At the end we had to patch the Android NDK while chrome build script checkouts working version of NDK and all other required tools.
With docker script any engineer in the team could build the engine from scratch no mater which OS he uses.
Iam developing an android mobile application to scan text and save the details to phone. Iam developing in windows , using eclipse and whilst doing research I came across this article that pointed to the fact that an installation of cygwin is required to develop such an application. Cygwin however is very large after 3 hours of downloading it had only downloaded about 6 of the required 12gigabytes. I would jus like to know where Iam going wrong with cygwin , whether its mandatory that cygwin is installed and if that is the case which specific packages should be installed??
Thank you
From ndk r7, we don't need cygwin anymore. Just set NDK path in system environment then run ndk-build command and it should work. For more detail, look this answer.
You can follow this tutorial to set up enviroment for tesseract on Android with tess-two library. These commands are used for build tess-two:
cd <project-directory>/tess-two
ndk-build
android update project --path .
ant release
I'm trying to explore libVLC for Android that's why setting up VLC android project on windows 7 but i'm facing problems. When i import the project and setup all helping libraries and try to compile using NDK it gives following error
make.exe: *** No rule to make target `jni/..//modules/codec/omxil/iomx.cpp',
needed by `obj/local/armeabi/objs-debug/iomx gingerbread/__//modules/codec/omxil/iomx.o'. Stop.
While when i try to search the file in my folder i only able to find iomx.h and iomx.cpp is actually missing but i downloaded the project from official repository.
git clone git://git.videolan.org/vlc-ports/android.git
I'm willing to follow a tutorial with proper configurations to setup and compile android application of VLC but i'm not able to find any tutorial and the official one says that it is for Linux and you will require a Linux or Mac OSX to follow this tutorial Tutorial Link. So my first question is
Can we Compile VLC android project Using all mentioned tools like (Android SDK, NDK, ant etc) on a windows platform.
Secondly i'm not able to find a detailed or much easy Documentation except this one VLC Documentation link, Are there any other easy to understand libVLC documentation more specific to android usage
Please help me or guide me in right direction. I want to develop an application for Docked DVD device for android.
I found my answer about this by myself and today watched this question unanswered so thought to answer it so that it can be helpful for others.
For the first part the answer is 'NO' we cannot compile the libVLC code on Windows OS using NDK as due to complex compilation process of libVLC. it Cannot be compiled using NDK tools that's why VLC released a script to compile libVLC which is in main directory when you download code from Git repository named Compile.sh and it can be run only on linux or mac as both based on Unix. i.e for libVLC compilation you need to run compile.sh which requires alot of linux based tools as mentioned in their official tutorial for compilation. you can try all those packages through cygwin on windows but i have not tried that rather i switched to Ubuntu 13.04 so that i can also explore linux environment...:). One thing i like to mention here if your target is just to use the compiled C++ code of libVLC in your project through java then you can do this on windows OS using libVLC.so file but if you need to change the libVLC code and recompile it then you will need to run compile.sh which requires linux or mac.
For the Second one the answer is same that as far as i know the only documentation i found was that i mentioned in my question.
I have downloaded the android source code 4.0.3, installed cygwin with make and gcc, and downloaded
ndk and sdk, integrated eclipse with cdt and adt. Using windows 7 64bit.
Can you guys tell me how to build this source code in eclipse in order to customize the native settings
menu.
Thanks in advance.
FYI :I have been through google, stackoverflow, but couldn't find any lead which works.
See these pages in the Developer docs: Initializing a Build Environment. This page seems to indicate that Mac, and Linux are the only supported build environment OS. I would suggest using one of those instead of Windows 7.
Once you've got environment set up see also: Building and Running
I think it will be very difficult. From my experience, even on the supported platforms there are difficulties to tune build environment. Windows is not supported so I think this is almost impossible there.
Maybe in your case it's worth to install a virtual machine?
When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error:
/c/Users/Andrew Rabon/bin/repo: line
23: exec: python: not found
I've downloaded repo and put it in ~/bin like it says, and I've installed Python. I wonder what the issue could be.
For reference, I'm using msysgit on Windows Vista, I understand msysgit is limited, but I hope it can at least pull the android source.
I ended up creating a VirtualBox vm with Ubuntu installed. Followed the directions on the source code site and then zipped up the source and copied it over via file share to my windows machine. It's a bulky solution but it's the most straightforward as you don't have to deal with cryptic scripting issues.
I imagine that you could make msysgit and repo work with some tweaking,
In particular, I think there is an advantage in using Cygwin. It seems to have superior handling of case sensistive file names. This might be irrelevant for the main Android code base, but I know for a fact that it is necessary for the Linux kernel.
You cannot build Android on Windows. However, you should be able to use repo to pull the source code. I've done this. I imagine you must be using Cygwin. You'll need Python 2.4 (according to Get Source) and make sure you don't have any other Python installations on Windows or Cygwin that are overriding it. Check your version using the python interactive shell.