Football Fans: Download the 2012 Schedule App from Google Play!


Go Back   Android Forums > Android Development > Application Development > Developer 101

Developer 101 101 Tutorials



Reply
 
LinkBack Thread Tools
Old November 1st, 2011, 10:06 AM   #1 (permalink)
New Member
 
Join Date: Oct 2011
Posts: 8
 
Device(s):
Thanks: 4
Thanked 0 Times in 0 Posts
Default Help needed with building Android Terminal Emulator

I am doing a project where we have to use the Android Terminal Emulator. I downloaded the the Jackpal Android Terminal Emulator from github and using the instructions in the document to build the terminal emulator.

https://github.com/jackpal/Android-Terminal-Emulator/blob/master/docs/Building.txt

I am having trouble installing the package in the first step itself, i.e. building the ndk shared libraries.

According to the instructions provided:

Build the shared library:

cd <the-android-terminal-emulator-directory>
<path-to-the-android-ndk>/ndk-build



Accordingly, I typed the following in my cmd

C:\>cd androidterm
C:\androidterm>android-ndk-r6b/ndk-build

I got the following error message:
'android-ndk-r6b' is not recognized as an internal or external command,
operable program or batch file.

I am still learning Android and have never worked with the command line before. Could someone please help me? Is it a problem with the way I have typed the command?

Please help. I am really confused.

dulshi989 is offline  
Reply With Quote
Sponsors
Old November 1st, 2011, 03:12 PM   #2 (permalink)
Premium Member
 
Join Date: Oct 2011
Location: Sydney, Australia
Posts: 193
 
Device(s): Galaxy Nexus GSM
Thanks: 2
Thanked 37 Times in 33 Posts
Default

Those instructions assume your using a Unix-like environment. In a Unix-like environment, forward slashes (/) are used to separate the names in a path; eg android-ndk-r5/ndk-build. On Window, back blashes (\) are used instead; eg. android-ndk-r5\ndk-build.

The path android-ndk-r5\ndk-build was just an example in those instructions. You need to put the actual path to the NDK.

Have you downloaded the NDK, in additional to the SDK? If not, head to Android NDK | Android Developers, download the .zip file, and extract it somewhere.

Let's say your have revision 6b of the NDK extracted to C:\android-ndk-r6b. Then for you the steps to buiding the shared library would be:

C:\> cd \androidterm
C:\androidterm> \android-ndk-r6b\ndk-build
jiminaus is offline  
Last edited by jiminaus; November 2nd, 2011 at 03:20 AM. Reason: Removed the reference to the .dll, it would of course still be an .so even on Windows.
Reply With Quote
The Following User Says Thank You to jiminaus For This Useful Post:
dulshi989 (November 2nd, 2011)
Old November 2nd, 2011, 09:01 PM   #3 (permalink)
New Member
 
Join Date: Oct 2011
Posts: 8
 
Device(s):
Thanks: 4
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by jiminaus View Post

Let's say your have revision 6b of the NDK extracted to C:\android-ndk-r6b. Then for you the steps to buiding the shared library would be:

C:\> cd \androidterm
C:\androidterm> \android-ndk-r6b\ndk-build

Thank you, I did this too but it still gives the same error message:

C:\>cd \androidterm

C:\androidterm> C:\android-ndk-r6b\ndk-build
'C:\android-ndk-r6b\ndk-build' is not recognized as an internal or external comm
and,
operable program or batch file.

Any help would be greatly appreciated!
dulshi989 is offline  
Reply With Quote
Old November 3rd, 2011, 04:32 AM   #4 (permalink)
Premium Member
 
Join Date: Oct 2011
Location: Sydney, Australia
Posts: 193
 
Device(s): Galaxy Nexus GSM
Thanks: 2
Thanked 37 Times in 33 Posts
Default

What is the output of these two commands?

C:\> dir C:\ /w
C:\> dir C:\android-ndk-r6b /w
jiminaus is offline  
Reply With Quote
Old November 3rd, 2011, 08:44 PM   #5 (permalink)
New Member
 
Join Date: Oct 2011
Posts: 8
 
Device(s):
Thanks: 4
Thanked 0 Times in 0 Posts
Default

Here it is..

C:\>dir C:\ /w
Volume in drive C has no label.
Volume Serial Number is BA10-BF0A

Directory of C:\

[.android] [android-ndk-r6b] [android-sdk-windows]
[androidterm] [BigFishGamesCache] [dell]
[Intel] [NST] [PerfLogs]
[Program Files] [Program Files (x86)] [Users]
[Windows] [xampp]
0 File(s) 0 bytes
14 Dir(s) 63,532,199,936 bytes free


C:\>dir C:\android-ndk-r6b/w
Volume in drive C has no label.
Volume Serial Number is BA10-BF0A

Directory of C:\android-ndk-r6b

[.] [..] [build]
[docs] documentation.html GNUmakefile
ndk-build ndk-gdb ndk-stack.exe
[platforms] README.TXT RELEASE.TXT
[samples] [sources] [tests]
[toolchains]
7 File(s) 197,342 bytes
9 Dir(s) 63,532,208,128 bytes free
dulshi989 is offline  
Last edited by dulshi989; November 3rd, 2011 at 08:48 PM.
Reply With Quote
Old November 4th, 2011, 01:34 AM   #6 (permalink)
Premium Member
 
Join Date: Oct 2011
Location: Sydney, Australia
Posts: 193
 
Device(s): Galaxy Nexus GSM
Thanks: 2
Thanked 37 Times in 33 Posts
Default

Huh?! Why's there no extension on ndk-build in C:\android-ndk-r6b?!
jiminaus is offline  
Reply With Quote
Old November 4th, 2011, 01:50 AM   #7 (permalink)
Premium Member
 
Join Date: Oct 2011
Location: Sydney, Australia
Posts: 193
 
Device(s): Galaxy Nexus GSM
Thanks: 2
Thanked 37 Times in 33 Posts
Default

Damn, I'm glad I don't use Windows.

So despite having a Windows .zip download, the NDK has not really been ported to Windows.

ndk-build is Bash script. Hence the lack of an extension and the inability for cmd.exe to run it.

You need to download and install the latest version of Cygwin. This is will give you the Unix environment you need to be able to use the NDK under Windows.

After you've done that you should have a something like a Cygwin shell icon on the desktop or in your start menu. When you run that, you'll get a text shell window kinda like the command prompt, except you'll be inside a bash shell where you can issue unix command. (Yes, I'm talking very loosely here.)

Once you're in a bash shell, try these commands.
Code:
cd /cygdrive/c/androidterm
../android-ndk-r6b/ndk-build
jiminaus is offline  
Last edited by jiminaus; November 4th, 2011 at 01:54 AM.
Reply With Quote
The Following User Says Thank You to jiminaus For This Useful Post:
dulshi989 (November 5th, 2011)
Old November 5th, 2011, 04:58 AM   #8 (permalink)
New Member
 
Join Date: Oct 2011
Posts: 8
 
Device(s):
Thanks: 4
Thanked 0 Times in 0 Posts
Default

Thank you so very much for your help and effort!

Errgh! Windows is such a mess:s! I feel like switching straight to Linux.

So just one more question: what would be the best Linux O/S for a developer?
dulshi989 is offline  
Reply With Quote
Old November 5th, 2011, 04:50 PM   #9 (permalink)
Premium Member
 
Join Date: Oct 2011
Location: Sydney, Australia
Posts: 193
 
Device(s): Galaxy Nexus GSM
Thanks: 2
Thanked 37 Times in 33 Posts
Default

Quote:
Originally Posted by dulshi989 View Post
what would be the best Linux O/S for a developer?
Mac OS X.

If you're new to Linux, you'll probably get up and running the quickest with Ubuntu.
jiminaus is offline  
Reply With Quote
Reply

Bookmarks


Go Back   Android Forums > Android Development > Application Development > Developer 101 User CP
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -5. The time now is 08:11 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Custom vBulletin Skins by: Relivo