Bash command line + eclipse - build/run NDK project?

186 views
Skip to first unread message

SChaser

unread,
Nov 25, 2010, 6:50:24 PM11/25/10
to android-ndk
I have an NDK project which I have been developing using Eclipse for
the Java, and Cygwin command line (ndkbld) for the NDK.

However, I'd like to avoid the multi-step build/run process if
possible. Right now, that process is:

ndk-build

go to eclipse

select project->refresh (builds project)

run project

select logcat, maximize it

When I'm doing a bunch of NDK, I'd rather just go from the bash
(cygwin) command line and type one command (presumably using Ant) that
would:

build the ndk,

build the java,

package it up,

send it to the device,

and do whatever it takes to display the logcat output.

I'm sure its possible to do an Ant build.xml to do this, but I'm
hoping someone already has one I could use as a model.

Tks in advance.

Kelly

unread,
Nov 26, 2010, 4:37:51 AM11/26/10
to android-ndk
http://developer.android.com/guide/developing/other-ide.html

Read it. If you want to use ant, your build or not, it can only help
to understand what's going on. Secondarilarily, you need to see how
ant executes externals: http://ant.apache.org/faq.html#batch-shell-execute

That will tell you how to call ndk-build from ant.

Cheers

Mike Edenfield

unread,
Nov 28, 2010, 8:54:20 PM11/28/10
to andro...@googlegroups.com
On Thu, 2010-11-25 at 15:50 -0800, SChaser wrote:
> I have an NDK project which I have been developing using Eclipse for
> the Java, and Cygwin command line (ndkbld) for the NDK.
>
> However, I'd like to avoid the multi-step build/run process if
> possible. Right now, that process is:

If you are using Eclipse 3.6, then I'd strongly suggest you add the
latest p2 repo from the Sequoyah project (1.1 -- not the one that's
already in the Eclipse software list) and install the Android Native
Support plug-in.

It provides the scaffolding that the CDT plug-in needs to properly do
NDK builds -- a "Build" command will build your NDK components, then
your Java components, all at once. And unlike the previous attempts to
integrate the NDK into Eclipse, I've never had this one fail to actually
produce a new .apk file.

(It also gives you integrated step-through debugging via gdbserver,
including stepping native <--> managed code, though that takes a bit
more work because the ndk's version of gdbserver is useless.)

--Mike

ict-guys ictguys

unread,
Nov 29, 2010, 9:58:24 PM11/29/10
to andro...@googlegroups.com
I would also back that up. With sequoyah I am able to build the native project as well in the eclipse environment and debugging the native code too is possible but i am not able to set it up properly. I am getting the error "Error creating process when the C++ debug configuration is invoked.

Regards,
Murari
 

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.




--
Regards,
Murari Krishnan
Reply all
Reply to author
Forward
0 new messages