{"id":1646,"date":"2010-06-28T00:00:00","date_gmt":"2010-06-27T15:00:00","guid":{"rendered":"http:\/\/oohito.com\/nqthm\/archives\/1646"},"modified":"2010-06-28T00:00:00","modified_gmt":"2010-06-27T15:00:00","slug":"android%e3%81%aehello-world-tutorial-2","status":"publish","type":"post","link":"https:\/\/oohito.com\/nqthm\/archives\/1646","title":{"rendered":"Android\u306eHello World tutorial"},"content":{"rendered":"<div class=\"section\">\n<p>Android SDK\u3092\u7528\u3044\u3066Hello World\u3092\u4f5c\u308b\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3002\u5143\u30cd\u30bf\u306f\u4ee5\u4e0b\u3088\u308a\u3002<\/p>\n<p><a href=\"http:\/\/developer.android.com\/resources\/tutorials\/hello-world.html\" target=\"_blank\" rel=\"noopener\">http:\/\/developer.android.com\/resources\/tutorials\/hello-world.html<\/a><\/p>\n<h4>\u30b9\u30c6\u30c3\u30d71. AVD\u3092\u4f5c\u308b\u3002<\/h4>\n<p>AVD\u3068\u3044\u3046\u306e\u306fAndroid Virtual Device\u306e\u7565\u3060\u305d\u3046\u3060\u3002\u30a2\u30f3\u30c9\u30ed\u30a4\u30c9\u4eee\u60f3\u7aef\u672b\u3068\u3044\u3046\u610f\u5473\u304b\u3002\u307e\u305a\u3001\u958b\u767a\u5bfe\u8c61\u3068\u306a\u308bAVD\u3092\u4f5c\u308b\u3002<\/p>\n<ol>\n<li>Eclipse\u3092\u8d77\u52d5\u3057\u3001Window\u30e1\u30cb\u30e5\u30fc\u306eAndroid SDK and AVD Manager\u3092\u9078\u3076\u3002<\/li>\n<li>Virtual Devices\u3067\u3001New\u2026\u3092\u30af\u30ea\u30c3\u30af\u3057\u3001Create new Android Virtual Device (AVD)\u753b\u9762\u3092\u51fa\u3059\u3002<\/li>\n<li>Name\u306b\u9069\u5f53\u306a\u540d\u524d\uff08my_avd\uff09\u3092\u5165\u529b\u3057\u3001target\u3067\u9069\u5f53\u306a\u3082\u306e\u3092\u9078\u3076\u3002\u3053\u3053\u3067\u306fAndroid 1.6 &#8211; API Level 4\u3068\u3059\u308b\u3002<\/li>\n<li>Create AVD\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u3001Android SDK and AVD Manager\u753b\u9762\u3092\u9589\u3058\u308b\u3002<\/li>\n<\/ol>\n<h4>\u30b9\u30c6\u30c3\u30d72. \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u308b\u3002<\/h4>\n<ol>\n<li>File\u30e1\u30cb\u30e5\u30fc\u304b\u3089New &#8211; Project\u2026\u3092\u9078\u3093\u3067New Project\u753b\u9762\u3092\u51fa\u3059\u3002<\/li>\n<li>Wizards:\u304b\u3089Android\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u3001Android Project\u3092\u9078\u3073\u3001Next\u3092\u62bc\u3059\u3002<\/li>\n<li>Project name\u306bHelloAndroid\u3001Application name\u306bHello, Android\u3001ackage name\u306bcom.example.helloandroid\u3001Create Activity\u306bHelloAndroid\u3092\u305d\u308c\u305e\u308c\u5165\u529b\u3059\u308b\u3002<\/li>\n<li>Build Target\u306bAndroid 1.6\u3092\u9078\u3076<\/li>\n<li>Finish\u3092\u62bc\u3059\u3002<\/li>\n<\/ol>\n<h4>\u30b9\u30c6\u30c3\u30d73. Java\u30d5\u30a1\u30a4\u30eb\u3092\u4fee\u6b63\u3059\u308b<\/h4>\n<p>Hello, world\u3092\u8868\u793a\u3059\u308b\u3088\u3046\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u6210\u3059\u308b\u3002\u96db\u5f62\u306f\u65e2\u306b\u3042\u308b\u306e\u3067\u3001\u4e00\u90e8\u3092\u4fee\u6b63\u3057\u3066\u3044\u304f\u3002<\/p>\n<ol>\n<li>Eclipse\u306ePackage Explorer\u306b\u3042\u308b\u3001HelloAndroid\u304b\u3089src &#8211; com.example.android\u3068\u5c55\u958b\u3057\u3066\u3044\u304d\u3001HelloAndroid.java\u3092\u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001\u53f3\u5074\u306b\u30d5\u30a1\u30a4\u30eb\u5185\u5bb9\u304c\u8868\u793a\u3055\u308c\u308b\u3002<\/li>\n<li>\u5f8c\u306e\u3088\u3046\u306b\u30d5\u30a1\u30a4\u30eb\u5185\u5bb9\u3092\u7f6e\u304d\u63db\u3048\u308b<\/li>\n<li>Run\u30e1\u30cb\u30e5\u30fc\u304b\u3089Run\u3092\u9078\u3076<\/li>\n<\/ol>\n<p>\u3057\u3070\u3089\u304f\u3059\u308b\u3068\u30a8\u30df\u30e5\u30ec\u30fc\u30bf\u30fc\u306e\u753b\u9762\u304c\u73fe\u308c\u3001ANDROID\u304c\u8d77\u52d5\u3057\u3001\u3055\u3089\u306b\u5f85\u3064\u3068\u9ed2\u3044\u753b\u9762\u4e0a\u306bHello, Android\u306e\u6587\u5b57\u304c\u73fe\u308c\u308b\u3002<\/p>\n<pre>\npackage com.example.android.apis;\nimport android.app.Activity;\nimport android.os.Bundle;\nimport android.widget.TextView;\npublic class HelloAndroid extends Activity {\n\/** Called when the activity is first created. *\/\n@Override\npublic void onCreate(Bundle savedInstanceState) {\nsuper.onCreate(savedInstanceState);\nTextView tv = new TextView(this);\ntv.setText(\"Hello, Android\");\nsetContentView(tv);\n}\n}\n<\/pre>\n<h4>\u30b9\u30c6\u30c3\u30d74. \u5b9f\u6a5f\u306b\u3066\u30c6\u30b9\u30c8\u3059\u308b\u3002<\/h4>\n<ol>\n<li>\u5b9f\u6a5f\u306b\u3066\u3001menu &#8211; Settings\u3092\u9078\u3076\u3002<\/li>\n<li>Applications\u3092\u9078\u3073\u3001Development\u3092\u9078\u3076<\/li>\n<li>USB debugging\u3092\u30aa\u30f3\u306b\u3059\u308b<\/li>\n<li>\u5b9f\u6a5f\u3092\u958b\u767a\u6a5f\u3068USB\u30b1\u30fc\u30d6\u30eb\u3067\u63a5\u7d9a\u3059\u308b<\/li>\n<li>USB connected\u3001USB debugging connected\u304cNotification\u306b\u73fe\u308c\u308b<\/li>\n<li>Eclipse\u306b\u3066Run &#8211; Run\u3092\u9078\u3076<\/li>\n<li>\u5b9f\u6a5f\u4e0a\u306bHello, World\u304c\u73fe\u308c\u308b<\/li>\n<\/ol>\n<p>\u304b\u306a\u308a\u7c21\u5358\u306b\u30c6\u30b9\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u5b9f\u884c\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Android SDK\u3092\u7528\u3044\u3066Hello World\u3092\u4f5c\u308b\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3002\u5143\u30cd\u30bf\u306f\u4ee5\u4e0b\u3088\u308a\u3002 http:\/\/developer.android.com\/resources\/tutorials\/hello-world.ht&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[],"class_list":["post-1646","post","type-post","status-publish","format-standard","hentry","category-21"],"_links":{"self":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/posts\/1646","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/comments?post=1646"}],"version-history":[{"count":0,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/posts\/1646\/revisions"}],"wp:attachment":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/media?parent=1646"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/categories?post=1646"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/tags?post=1646"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}