{"id":414,"date":"2023-02-25T11:01:50","date_gmt":"2023-02-25T03:01:50","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=414"},"modified":"2023-04-29T21:27:21","modified_gmt":"2023-04-29T13:27:21","slug":"android-ndk-basic-ndk-development-under-eclipse","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/02\/25\/android-ndk-basic-ndk-development-under-eclipse\/","title":{"rendered":"Android NDK\u57fa\u784014\uff1aEclipse\u4e0bNDK\u5f00\u53d1"},"content":{"rendered":"<p>Eclipse NDK\u5f00\u53d1\u6d41\u7a0b<\/p>\n<ul>\n<li>1.\u7f16\u5199Java\u5c42Native\u65b9\u6cd5<\/li>\n<li>2.javah\u547d\u4ee4\u751f\u6210\u5934\u6587\u4ef6<\/li>\n<li>3.\u521b\u5efajni\u76ee\u5f55<\/li>\n<li>4.\u6dfb\u52a0\u672c\u5730\u652f\u6301Android Tools -&gt; Add Native Support<\/li>\n<li>5.\u5b9e\u73b0\u5934\u6587\u4ef6\u4e2d\u5b9a\u4e49\u7684\u51fd\u6570<\/li>\n<li>6.\u7f16\u8bd1\u751f\u6210.so\u52a8\u6001\u5e93<\/li>\n<li>7.\u52a0\u8f7d\u52a8\u6001\u5e93<\/li>\n<\/ul>\n<p><!-- more --><\/p>\n<h3>Eclipse ADT \u9009\u62e9NDK\u76ee\u5f55\u65f6\u4e0d\u8bc6\u522b\uff0c\u51fa\u73b0\u201cNot a valid NDK directory\u201d<\/h3>\n<p>\u89e3\u51b3\u65b9\u6848\uff1a\u5728ndk\u7684\u4e3b\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2andk-build\u7a7a\u6587\u4ef6\uff0c\u5173\u95ed\u5bf9\u8bdd\u6846\u518d\u6b21\u5c1d\u8bd5<\/p>\n<p><a target=\"_blank\" rel=\"noopener\" href=\"http:\/\/stackoverflow.com\/questions\/36043047\/adt-23-doesnt-like-ndk11\">http:\/\/stackoverflow.com\/questions\/36043047\/adt-23-doesnt-like-ndk11<\/a><\/p>\n<h3>\u6dfb\u52a0\u5934\u6587\u4ef6\u8def\u5f84\u652f\u6301<\/h3>\n<p>\u9879\u76ee\u5c5e\u6027 -&gt; C\/C++ General -&gt; Paths and Symbols -&gt; Includes<\/p>\n<p>\u6dfb\u52a0\u5982\u4e0b\u76ee\u5f55\uff08\u540c\u65f6\u52fe\u9009Add to all languages\uff09<\/p>\n<pre><code>F:\\android-ndk\\android-ndk-r13b\\toolchains\\arm-linux-androideabi-4.9\\prebuilt\\windows-x86_64\\lib\\gcc\\arm-linux-androideabi\\4.9.x\\include\n\nF:\\android-ndk\\android-ndk-r13b\\toolchains\\arm-linux-androideabi-4.9\\prebuilt\\windows-x86_64\\lib\\gcc\\arm-linux-androideabi\\4.9.x\\include-fixed\n\nF:\\android-ndk\\android-ndk-r13b\\platforms\\android-16\\arch-arm\\usr\\include<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Eclipse NDK\u5f00\u53d1\u6d41\u7a0b 1.\u7f16\u5199Java\u5c42Native\u65b9\u6cd5 2.javah\u547d\u4ee4\u751f\u6210\u5934\u6587\u4ef6 3.\u521b\u5efajn [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-414","post","type-post","status-publish","format-standard","hentry","category-android-ndk"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/414","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=414"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/414\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=414"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=414"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=414"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}