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

276. Tommie9823 -- 2019-06-28 13:25

You can get the best service of the restaurant auctions with us we have the best experts to provide you the best auctions from all over the USA in our current auctions you can get all here

277. Arvidson3423 -- 2019-06-28 17:01

For the best furniture you are in the right place we can provide you the best service of the discount rate furniture with us you can get the best expert designers to help to provide you the best service in the furniture market

278. Summerville232 -- 2019-06-28 17:47

You can get the best service with us we have the best basement service in Ohio foundation settling, basement refinish, bowing basement walls and many more services you can get with us in Ohio

279. Gaynell J. Moreau -- 2019-06-30 04:13

I come across a superb web-site for any long time. .Thanks for sharing great short article. .And I’ll pay a visit to your website

280. anonymous -- 2019-07-01 08:39

If you are going to be enjoying things in life then you will be in need of so many thing

281. sasi -- 2019-07-01 11:29

I really like the dear information you offer in your articles. I’m able to bookmark your site and show the kids check out up here generally. Im fairly positive theyre likely to be informed a great deal of new stuff here than anyone

282. annie -- 2019-07-03 11:11

We ensure that each product is strictly inspected, qualified environmental protection, fashionable design, high quality materials, you can have a low price, our products include rings, necklaces, earrings, bracelets. <br/> <a href="" rel="dofollow">Cheap Jewelry Gifts</a> <br/> <a href="" rel="dofollow">Cheap Jewelry Stores</a> <br/> <a href="" rel="dofollow">Cheap Jewelry for Sale</a>

283. -- 2019-07-03 13:08

Our Pay for <a href=""> non plagiarized research papers</a> services makes your college life bearable and also receive the <a href=""> pay for term papers</a> fulfilling by enabling you to pass your exams and also in other research and essay writing tasks.

284. David Strawn -- 2019-07-03 15:31

You can get the best service with us for the development and the designing for the best help you can visit us we can provide you with the best service of the designing here...

285. amran -- 2019-07-05 01:57

baca kumpulan artikel tentang penyakit,manfaat tanaman dan <a href="">arti mimpi</a>

287. -- 2019-07-12 09:31

Keep up the good work going....

In the event that you are searching for appealing youthful escorts,or maybe an indiscriminate escort for a horny couple arrangement - we'll watch that you find the correct date... Follow us now:_

289. Helen J. Wallace -- 2019-07-18 13:37

Your mode of telling the whole thing in this piece of writing is actually good, all be capable of without difficulty understand it, Thanks a lot.

290. Chandigarh Escorts Service -- 2019-07-22 09:24

all Post are very informative. thanks for sharing with us. I will regular update on this site. Thanks..

291. anonymous -- 2019-07-22 10:16

Chandigarh Escorts is provided high demand services are available 24/7 for the customers to clutch the great opportunity for the satisfaction to enjoy your life freely. Everyone knows about our escorts agency escort how famous they are, dating a sexy call girl and spend some important time with our partners are also available.

292. anonymous -- 2019-07-22 12:43

Hello Guys, when Come to Chandigarh to meet especially hot and lusty call girls who seek pleasure and this Chandigarh escorts service for your sexual enjoyment. Visit our website for all detail.

293. anonymous -- 2019-07-22 14:22

Escort Service Chandigarh Agency: offer attractive sexy Chandigarh escorts services. Choose handsome model escorts and independent call girls in Chandigarh at affordable rates.

294. bilaspur university -- 2019-07-22 14:59
295. bilaspur university -- 2019-07-22 15:00

great info keep it up

296. anonymous -- 2019-07-23 09:50

Such an unbelievable post. first-time I visit your site and I am glad to be here and examined this incredible post. I have examined a few articles on your site and I really like your style.

297. anonymous -- 2019-07-25 09:23

I don't know yet, I hope to have the help of the boards, and I really want to get to know you all on the forum.

299. -- 2019-07-31 11:32

Great post about chronic about work I Get more help from your post I found so many blogs related to this But do not get that much information also I found some interesting information about Best Nursing Colleges in California visit

300. Louis -- 2019-08-01 08:59

Great code! I'm looking for this code for a long time. Thank you so much for sharing it here hotmail login english I hope to see more updates from you.

301. Zirakpur escorts -- 2019-08-05 13:11

Nice post..

Zirakpur escorts service is the best escorts service you are looking for we provide all Russian and Punjabi escorts..

Follow Us:_

302. shriya sharma -- 2019-08-12 14:56

I only say thank you for all the undertakings that you put in this article and gives us such a amazing informative article. you are inspiration to us.

304. Gclub -- 2019-08-17 10:43

This is a good information ! excellent post as always i like it thank you for sharing

305. Gclub Royal1688 -- 2019-08-17 10:45

Good post i am pretty much pleased with your good post.You put really very helpful information

306. sonam sharma -- 2019-08-17 10:51

Wow! I am glad to get myself in touch with you. Thanks for share it… Holy Shit! How is it possible to have such an immense collection of call girls? Believe me, but I never crossed a collection of escorts like this.

307. sonam sharma -- 2019-08-17 10:52

Thank you so much for sharing these amazing tips. I must say you are an incredible writer, I love the way that you describe the things. Please keep sharing.

Add New Comment