Build and run Android NDK applications without Eclipse

If you already have a development environment and do not wish to use Eclipse, you can easily build and run your NDK application from makefiles or the command line.

First of all, you need to set the ANDROID_NDK_ROOT environment variable and ensure the SDK and NDK binary directories are in PATH. Here are my definitions:


This is best defined in one of your shell’s startup scripts such as .zshenv.

Build and install package

Now, whenever you are in an NDK project’s directory, build the project using:

ndk-build && ant release

And to upload it to the emulator or to a connected device:

ant release install

That’s all! Those two simple commands can easily be launched from your preferred development environment.

Update: ant compile no longer exists in recent SDKs; replaced with ant release.

Run package

You can use adb to run any application remotely. For instance:

adb shell am start -a android.intent.action.MAIN -n $PACKAGENAME/.$ACTIVITYNAME

Both package name and activity name can be found in your AndroidManifest.xml.

  • Posted: 2011-03-11 01:26 (Updated: 2012-09-23 18:55)
  • Author: sam
  • Categories: android code tip


1. anonymous -- 2012-09-20 17:13

This is only build and install, how about run?!

2. sam -- 2012-09-23 18:56

@anonymous: you’re right, I lied about the running! I added the relevant information.

130. jzakCoame -- 2017-01-02 11:37

kv9396 cheap generic levitra online ao4079dz2028sg7619 wz3647

133. BiesCaw -- 2017-01-02 14:46

Hello, I just wanted to say hi, great to be here, engaging comunity! In come what may you interested, my website:

138. udtpBleby -- 2017-01-02 21:03

jx3405 buy levitra online australia ye5877wv6144cl6031 wf7338

141. ieotCoame -- 2017-01-03 04:45

ea3796 sildenafil pediatric dosing ng2269qy4351bn880 kt4780lt7728

148. Smitha414 -- 2017-01-03 16:11

Howdy would you mind sharing which blog platform you're working bedbffecaekeakge

163. Smithc114 -- 2017-01-04 23:36

Thanks for this article. I might also like to say that it can end up being hard if you find yourself in school and merely starting out to create a long credit rating. There are many learners who are only trying to endure and have long or good credit history are often a difficult issue to have. aagkdefdgeeedabe

203. Smithg23 -- 2017-02-20 18:50

Your style is really unique compared to other folks I've read stuff from. kekacafkddackabb

204. Loriyar -- 2018-01-22 05:48

You style of writing is unique and more clear itself. Really nice. I am trying to make rating about my credit. You can get good report from

205. anonymous -- 2018-07-16 18:21

They are leading the review due to the expanded rivalry, organizations are upgrading visitor fulfillment and keeping their current visitors as opposed to designating extra assets to pursue new ones on the grounds that the exertion of holding existing visitor is significantly less demanding than getting new ones.

206. feetyrider -- 2018-09-04 12:25

This blog will contain various articles about the development of the Lol Engine, game development and development in general.

207. autocad online help -- 2018-09-08 12:56

I Am So Happy To Read This. This Is The Kind Of Manual That Needs To Be Given And Not The Random Misinformation That's At The Other Blogs.

208. ebook writing  -- 2018-09-08 14:11

Such A Nice Post, Keep Providing Good Resources.

209. anonymous -- 2018-09-24 04:04

How about run?

210. anonymous -- 2018-09-24 04:04

How about run?

211. araaaaaad -- 2018-11-09 09:34

حتما برای شما اتفاق افتاده که در لحظه ی خروج از خانه متوجه خالی بودن باتری گوشی موبایلتان شوید. این اتفاق ممکن است به قیمت تغییر برنامه‌ی کلی روزتان منجر شود. پاوربانک یا شارژر همراه از مهم ترین اکسسوری های دیجیتال می باشد. پاوربانک‌ها در حقیقت شارژرهای همراه مخصوصی هستند که بر اساس ظرفیت باتری در دسته‌هایی از قبیل خرید پاوربانک موبایل، خرید پاوربانک دوربین و خرید پاوربانک لپ‌تاپ دسته‌بندی می‌شوند. ظرفیت هر شارژر همراه که بر اساس میلی‌آمپر اندازه گیری می‌شود متفاوت است. برای مثال یک پاور بانک ۱۵۰۰ میلی‌آمپر می‌تواند یک گوشی هوشمند با سایز صفحه‌ی متوسط را به طور کامل شارژ نماید، اما برای موبایل‌هایی با صفحه‌نمایش بزرگتر که دارای ظرفیت باتری بیشتری هستند باید پاوربانکی با ظرفیت بالاتری تهیه شود. شاید بپرسید با خرید پاوربانک چندبار می‌توانیم موبایل یا یک اکسسوری دیجیتال را شارژ کنیم؟ باید گفت که تعداد شارژ کامل بستگی به ظرفیت باتری و ظرفیت پاوربانک شما دارد. برای مثال یک پاور بانک ۶۰۰۰ میلی آمپر می‌تواند دستگاهی با ظرفیت باطری ۱۵۰۰ میلی آمپر را در حدود چهار بار شارژ کند. در حال حاضر پاوربانک‌های فراوانی از کمپانی‌های مختلف در بازار موجود است که از این میان می‌توان به پاوربانک سامسونگ، پاوربانک انکر، پاوربانک شیاومی و پاوربانک ریمکس اشاره کرد. این پاوربانک‌ها گاهی با امکانات اختصاصی برند خود تولید می‌شوند برای نمونه پاوربانک‌ چراغ‌قوه دار یا پاوربانک خورشیدی. با این حال بهترین پاور بانک، پاوربانکی است که شرایط جوی تاثیر کمتری بر روی آن داشته باشد. مثلا در صورت قرار داشتن پاوربانک در هوای گرم داخل ماشین، باتری آن به میزان زیادی کاهش نیابد، به طور معمول پاوربانک‌های معتبر، دارای قدرت حفظ باتری بیش از چند ماه می‌باشند. اما پاوربانک ارزان قیمت یا شارژر همراه ارزان قیمت و برند متفرقه میزان مدت کمتری باتری نگهداری می‌کند قیمت خرید پاوربانک‌ها بر اساس کمپانی تولید کننده، ظرفیت باتری، طراحی، وزن، تعداد ورودی و گارانتی آن مشخص می‌شود. با این حال قیمت پاوربانک‌های موجود در استایل آپ از رنج حدودی 75 هزار تومان شروع می‌شود. ما مفتخریم که با ارائه راهنمای خرید پاوربانک و شارژر همراه، خرید لوازم جانبی را برای کاربران راحت‌تر از همیشه نماییم.

212. nuage -- 2018-11-09 09:35

Nefelibata is an individual who lives in the clouds of his own mind

213. anonymous -- 2018-11-25 04:48

Do you need help in participating in Tell Pizza Hut Survey? Then this article is the one you are looking for.

214. -- 2018-11-28 14:28

If its all the same to you continue with this uncommon work and I envision a more prominent measure of your glorious blog sections.

215. anonymous -- 2018-12-01 17:27

Download happy glass 2.0

217. anonymous11 -- 2018-12-08 10:54

What is the best obd2 scanner that I can buy? Any advice from you? Is it ok to buy?

218. Mickey James -- 2018-12-13 10:31

Inform you well about Microsoft technology. is the best place to get hosting.

219. Assignment help online -- 2019-01-02 07:00

Try to add only relevant data and information. If you feel that you are stuck, you can take assignment help online to get a proper idea. There are several web services which can help you to find out a suitable solution to your problems.

220. Martin Stone -- 2019-01-12 08:53

I have been looking for data on this theme for as long as a couple of hours and observed your post to be elegantly written and has strong data. Much obliged to you!

221. Kate Daisy -- 2019-01-16 03:38

I am grateful to have opened this discussion. This question is quite interesting to me. Finally the answer was found cool math games

222. anonymous -- 2019-02-01 13:30

I am grateful to have opened this discussion.

223. parkeredward -- 2019-02-20 11:41

You have posted an incredible tutorial which I like reading as all the readers. I have learned a lot from this post <a href="">essay writer service</a>. I will share the post with my friends hope they find it informative.

224. anonymous -- 2019-02-20 12:14
225. anonymous -- 2019-02-20 12:31

The new version of android NDK is not allowing the old data of PNG to store in it. That's why it is showing error message for trying to upload the data into it. I even checked essay writer service blog if I can get any tutorial as well patch file regarding this failure in app.

226. james7595 -- 2019-02-23 06:16

Allassignmenthelp is a web portal where students get assignment help for all the subjects, with the help of our experts. You will get 100% plagiarism free assignment. Expert’s consultation is also available for students. If they have any query they can contact with our experts anytime.

227. Linda -- 2019-02-25 11:20

Thank you for sharing the post, this is what I need to find yahoo mail login I learned a lot from it and hope to see more updates from you.

228. Seema -- 2019-03-05 12:00

I have been looking or three your records and I can state astounding done I will bookmark your blog.

229. Deepa -- 2019-03-05 12:01

I found your article particularly enamoring The information given by you is to a stupifing degree stunning and fit.

231. Deepa -- 2019-03-05 12:03

Nice post paying little character to I was reasoning about whether you could make a litte on an immensely key estimation spectacularly all the all the all the all the besides concerning this issue? I'd be to a focal degree thankful in case you could wrap up being to a staggering degree further. Respect it.

232. Tina -- 2019-03-05 12:03

Awesome post! I am extraordinarily expecting to go over, this post is to a shocking degree key. By shot, Get.

233. Garima -- 2019-03-05 12:04

You have made a stupifing showing up concerning. I will burrow it and a little while later handle to my amigos. I am sure they will be profited by this site.

234. Dimpy -- 2019-03-05 12:05

I need to regard the creator. I expected to think about that. Thankful to you such an epic aggregate for giving the post to all. You are bookmarked.

235. Appi guru -- 2019-03-06 10:29

Appi Guru is the leading wearable device app development company in Florida, Miami. We develop apps for Smartwatches, Apple, and Android devices. Get engaging and intelligent apps for any wearable devices Today, the entire world is excited with the wearable technology is making our life easy. Basically, the trend of mobile development as shifted recently from the mobile devices to smart devices which are portable or wearable named as wearables. So get your business to the top drawer with wearable apps..

236. katedaisy -- 2019-03-11 10:49

The author clearly describe all the parts of the article with good language and information. Looking forward to another article. driving directions

240. John Smith -- 2019-03-30 15:12

Nice information just what i wanted <a href="">Recruitment News Portal</a>

241. -- 2019-04-01 08:38
242. -- 2019-04-01 11:21

we are providing best for hi-profile stunning call girls for fun and call successfully <a href="">escort service in jaipure</a>

243. call girls -- 2019-04-01 11:48

we are providing best for hi-profile stunning call girls for fun and call successfully <a href="">escort service in jaipure</a>

245. call girls -- 2019-04-02 14:25

we are providing best for hi-profile stunning call girls for fun and call successfully <a href="">escort service in jaipure</a>

246. 메이저사이트 -- 2019-04-06 19:46

I am definitely enjoying your website. You definitely have some great insight and great stories.

247. anonymous -- 2019-04-12 12:59

Thank for the giving these outstanding information you have a post very good job such a lovely posting..

248. anonymous -- 2019-04-15 14:16

The Most Popular Agency to Find Elite and Classic models in Jaipur Welcome to the of Jaipur most responsible and well known female girls in Jaipur organization. Our office is the main place known to provide well-disposed and erotic sweetheart and Jaipur friend that you can't reject even in the fantastic state.

249. anonymous -- 2019-04-15 14:17
251. Yas -- 2019-04-18 02:34
252. namita -- 2019-04-25 08:56
253. bhoomi -- 2019-04-25 08:56

I read your blog zone totally and found to a charging degree unending information, its shocking page fitting.

256. anonymous -- 2019-04-27 09:44

I like your incredible post. I wanted to embrace such kind of article. likewise, without a doubt the first occasion when I visit our site. likewise, I fulfilled to be here, an obligation of appreciation is all together for sharing this astonishing post.

257. anonymous -- 2019-05-07 11:54

I feel appreciative that I read this. It is absolutely immense and lighting up and I genuinely took in a ton from it.

258. anonymous -- 2019-05-07 11:54

Wow! Such a dumbfounding and fulfilling post this is. I unreasonably welcome it. It's so magnificent thusly amazing. I am basically dumbfounded.

259. anonymous -- 2019-05-07 11:55

Thankful for sharing this information. I truly like your blog district no delicacy on the planet. You have really shared an illuminating and dazzling on the web journal district with people.

260. anonymous -- 2019-05-07 11:55

I am glad to see this shocking post. most by a wide edge of the nuances are magnificently gainful and solid for us, keep up to exceptional work.

261. anonymous -- 2019-05-09 14:33

I am happy to be here on this website and I wish for more in future also. Thanks for providing such kind of information.

262. anonymous -- 2019-05-09 14:35

I am glad to be a part of such kind of information for which I was wondering for a long time. You have many great ideas to share with us.

263. anonymous -- 2019-05-09 14:37

Sometimes it is good to know about some kind information and I am glad to be here on this website.

264. nehasharma -- 2019-05-14 12:26

Really, I have totally agreed with this article and I essentially need to express that this article is a better than average and instructive article. I will make a point to examine your blog more. Thankful for keeping unbelievable stuff. I am especially thankful for this site.

265. anonymous -- 2019-05-15 06:11

You've picked such unique words in your article and I esteem this. Happy to see your posts reliably.

268. Simran -- 2019-06-04 08:36

We are one of the leading call girls service agency and providing very attractive and impressive escort models so that you can enjoy each and every moment of your life in the way you always wanted.

269. anonymous -- 2019-06-04 10:08

Book High Profile Chandigarh Escorts at Top rated Escorts in Chandigarh Service with best rates, Gentlemen can get their dream Girls right Now.

270. anonymous -- 2019-06-04 10:58

We are independent Chandigarh escorts. We offering the privilege of performing different sexual games with our professional female model celebrity Chandigarh escorts call girl.

271. Chandigarh call girls -- 2019-06-04 13:22

Click here <a href="">Chandigarh call girls</a>💚 Click here <a href="">Chandigarh Escorts</a>💚 Click here <a href="">Chandigarh independent escorts</a>💚 Click here <a href="">Chandigarh escort service</a>💚 Click here <a href="">Chandigarh escorts agency</a>💚 ================================================================================== Click here <a href="">Chandigarh call girls</a>💚 Click here <a href="">Chandigarh Escorts</a>💚 Click here <a href="">Chandigarh independent escorts</a>💚 Click here <a href="">Chandigarh escort service</a>💚 Click here <a href="">Chandigarh escorts agency</a>💚

272. anonymous -- 2019-06-04 13:42

Tanuu Club Chandigarh escorts agency beauty will be high on the demand list of choices for an escort in Chandigarh. Choose girls also come from India & International too at your place. Just call and get our girls service.

275. anonymous -- 2019-06-16 21:06

Very nice post. I just stumbled upon your blog and wanted to say that I really enjoyed browsing your blog posts

Add New Comment