Is there Android NDK support on Cloudbees? - android

Part of my build script requires that I run ndk-build, which apparently isn't on the PATH on the Cloudbees box because it chokes on the command. Does Cloudbees have the NDK installed somewhere I can point to?

Short term solution could be to upload http://developer.android.com/tools/sdk/ndk/index.html linux tar.gz in your private repository on cloudbees and add a pre-build step to expand it from /private/ to /tmp.

Related

Nightly build for android project using gradle

I have an android project which I'm developing in windows environment.
Also a remote git repository exist which I push my project to it daily.
My requirement is to have a mechanism to automate daily(or nightly) builds.
I know that I can build my project in command line by aid of "gardlew.bat". This wrapper is special to my environment (windows) and I need to build the project on remote git repository which is on a linux machine.
How can i build my project on a linux machine using command line?
As part of your project's root files, you can find "gradlew.bat" that is meant to run on windows machines, and a "gradlew" file that is meant to run on a unix based system.
To build from unix command line, clone your entire project into the linux based machine and run the following command:
./gradlew assembleRelease
You need to make sure that your environment is set up correctly (JDK is installed and JAVA_HOME is configured correctly).
For detailed explanation, please refer to the Android Studio developers site for more information.
You can install Jenkins and configure a job for building (and testing, if you have some tests) your application. Configure this job to run periodically (via embedded cron).
Jenkins can
clone source code from the repo
run gradle with the task(s) specified
save *.apk (save artifacts in Jenkins terminology)
run tests
and many other useful things you may be interested in
Consult https://jenkins.io/index.html

Installing Tesseract for android

Can someone guide me through the process of installing Tesseract OCR engine to use with Eclipse for android development. I have tried a few tutorials but they always lose me at some point. the last thing I tried was trying to download the repository for Tesseract available on github but when following the instructions (after having downloaded the NDK) and following this commands in the command line
`git clone git://github.com/rmtheis/tess-two tess
cd tess
cd tess-two
ndk-build***
android update project --path .
ant release`
when I get to ndk-build it doesnt recognize it as a command. also I have no idea what ant release is or does or if I need to install some software to use it.
Add the ndk folder to your PATH variable. If you are on windows, add the ndk-build path(../android-ndk-r10) to your environment variable PATH. If you are using MAC or linux set/export your PATH variable to include the path to your ndk folder.
Also set ANDROID_NDK_ROOT to point to the ndk folder. This will resolve the ndk-build command not recognized issue.
ant release - is to build your android project for release. This will building your final apk file that goes into play store.
ant debug - is to build the debug build of your application.
Set the JAVA_HOME variable to point to the JDK installation folder for ant to work properly.
set JAVA_HOME=c:\Progra~1\Java\<jdkdir>

Cygwin for Android-NDK programming

I read about the requirements of NDK programming on Windows which said we require Cygwin.Read about Cygwin which said we require it coz it is a way to make Windows support some linux functionality.But my question is in which stage of programming(Where Exactly) Cygwin will be required and why? Addidtional info about this topic is most welcomed
Android NDK starting with revision 7 doesn't require Cygwin. See here: http://developer.android.com/sdk/ndk/index.html
You can now build your NDK source files on Windows without Cygwin by calling the ndk-build.cmd script from the command line from your project path. The script takes exactly the same arguments as the original ndk-build script. The Windows NDK package comes with its own prebuilt binaries for GNU Make, Awk and other tools required by the build. You should not need to install anything else to get a working build system.
It mentions you can not use ndk-gdb script without Cygwin. While that is true, you can actually use gdb executable directly without Cygwin, only then you'll need to set it up properly manually.
At least NDK-r8b, if you want to build your .so, you don't need Cygwin.
However, if you want to use ndk-gdb to debug your native code,you have to use Cygwin.
And, in my experiment, if you ndk-gdb your native under Cygwin to debug native code which is built from windows cmd, ndk-gdb seems cannot recognize the debug info. So, for debug purpose, I build native Cygwin.
Make command to execute Android.mk file.
Android.mk file consists of list of c/c++ files to be compiled and also the library name(.so).
(from NDK-r8e NDK-GDB document) At the moment 'ndk-gdb' requires a Unix shell to run. This means that Cygwin is required to run it on Windows. We hope to get rid of this limitation in a future NDK release.

Building Android SDK: Only one Android target being created

Edit: I know I can download the SDK easily, but I specifically want to build everything myself. I'm trying to understand the build process more.
I used repo to download the AOSP source. Multiple places guide me to build the SDK as follows:
$ cd $AOSP_ROOT
$ . build/envsetup.sh
$ lunch sdk-eng
$ make sdk
This works perfectly, I get a zip file with the SDK and the emulator works. However, the only Android target that is generated is the latest one e.g.
$ cd $SDK_ROOT/platforms
$ ls
android-4.0.4.0.4.0.4
is all I see. How can I get the other Android targets? Do I have to use repo to switch the branch of Android that I'm on, build the entire SDK and just copy out the appropriate target files? Is there some simpler way, like a different make target that would achieve this? Can I request that the SDK be built and that all targets be available? Should I just download a non-locally-compiled SDK and copy the targets to my SDK_ROOT/platforms?
You need to use repo tool to switch to the appropriate branch and build your SDK for this branch. I do not think that it is possible to build SDK for all branches simultaneously.

Android NDK on Mac OSX - quick install w/o Developer Tools

I was just suggested to port some signal processing code to use the Android NDK to speed up the process, but I'm wondering 1. where to install it to and 2. what tool-chain to use
I'd prefer not downloading the 3.5GB Mac Developer Tools if possible. I don't have access to an install cd that has it. Want to try and get this done asap. Does anyone know a way to get NDK development running quickly on OSX(snow leopard)?
A version of make is included with the Android NDK. Simply add {NDK install dir}/prebuilt/darwin-x86/bin to your PATH and you'll be able to build with the NDK.
Unzip the NDK package for Mac OS X anywhere, then add it to your path. That's all you need to build code with the NDK. The NDK includes its own GCC-based toolchain, so you don't even need to have Xcode installed.
Go to the samples in the NDK and type ndk-build in the console to build them.
If you install Xcode, that will install Make.

Categories

Resources