{"id":5990,"date":"2017-10-03T10:00:56","date_gmt":"2017-10-03T01:00:56","guid":{"rendered":"https:\/\/www.gigas-jp.com\/appnews\/?p=5990"},"modified":"2017-10-02T18:56:26","modified_gmt":"2017-10-02T09:56:26","slug":"androidstudio%e3%81%aegradle","status":"publish","type":"post","link":"https:\/\/www.gigas-jp.com\/appnews\/archives\/5990","title":{"rendered":"AndroidStudio\u306egradle"},"content":{"rendered":"<p>AndroidStudio\u306egradle\u3067\u958b\u767a\u4e2d\u306b\u4fbf\u5229\u3068\u601d\u3063\u305f\u6a5f\u80fd\u3092\u3044\u304f\u3064\u304b\u7d39\u4ecb\u3057\u3066\u3044\u304d\u307e\u3059<br \/>\n\u4eca\u56de\u306fbuild.gradle\u306e\u4e2d\u306e\u6a5f\u80fd\u3068\u306a\u308a\u307e\u3059<\/p>\n<p><!--more--><\/p>\n<h3>\u4fbf\u5229\u6a5f\u80fd<\/h3>\n<h4>productFlavor<\/h4>\n<p>productFlavor\u306f\u3001<strong><span style=\"color: #0000ff\">\u4e00\u90e8\u6a5f\u80fd\u304c\u7570\u306a\u308b\u30a2\u30d7\u30ea\u3092\u4f5c\u6210\u3059\u308b\u6642<\/span><\/strong>\u306a\u3069\u306b\u4fbf\u5229\u3067\u3059<br \/>\n \u4f8b\u3048\u3070\u3001\u7121\u6599\u7248\u3068\u6709\u6599\u7248\u3067\u5e83\u544a\u306e\u6709\u308a\u7121\u3057\u306a\u3069\u3001\u30a2\u30d7\u30ea\u306e\u5143\u3068\u306a\u308b\u90e8\u5206\u306f\u4e00\u7dd2\u3067\u4e00\u90e8\u5206\u304c\u9055\u3046\u30a2\u30d7\u30ea\u3067\u3059<br \/>\n\u3053\u3053\u3067\u306f\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u540d\u306e\u307f\u5909\u66f4\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u5185\u3067Flavor\u540d\u3084\u30d1\u30c3\u30b1\u30fc\u30b8\u540d\u306e\u53d6\u5f97\u3067\u6a5f\u80fd\u3092\u5206\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059<\/p>\n<p>\u8a18\u8ff0\u306e\u4ed5\u65b9\u306f\u3001\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059(build.gradle)<\/p>\n<pre style=\"border: dashed #000000 2px\"><code>android {\r\n    productFlavors {\r\n        free{\r\n            applicationId \"sample.app.free\"\r\n        }\r\n        normal{\r\n            applicationId \"sample.app\"\r\n        }\r\n    }\r\n}\r\n<\/code><\/pre>\n<p>applicationId\u3060\u3051\u3067\u306a\u304fversionName\u3084signingConfig\u306a\u3069\u3082\u500b\u5225\u306b\u8a2d\u5b9a\u3067\u304d\u307e\u3059<\/p>\n<h4>signingConfigs<\/h4>\n<p>signingConfigs\u306f\u30d3\u30eb\u30c9\u6642\u306b\u81ea\u52d5\u3067\u30a2\u30d7\u30ea\u3078\u306e\u7f72\u540d\u306e\u8a2d\u5b9a\u3092\u8a18\u8ff0\u3057\u307e\u3059<br \/>\n <strong><span style=\"color: #0000ff\">\u3053\u308c\u3060\u3051\u3067\u306f\u3001\u81ea\u52d5\u3067\u7f72\u540d\u306f\u3057\u3066\u304f\u308c\u307e\u305b\u3093<\/span><\/strong>\u306e\u3067\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059<br \/>\n \u81ea\u52d5\u7f72\u540d\u3092\u3059\u308b\u306b\u306f\u3001\u4e0a\u8a18\u3067\u7d39\u4ecb\u3057\u305fproductFlavor\u3084defaultConfig\u306bsigningConfig\u3092\u8a18\u8ff0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059<br \/>\n \u8a18\u8ff0\u306e\u4ed5\u65b9\u306f\u3001\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059(build.gradle)<\/p>\n<pre style=\"border: dashed #000000 2px\"><code>android {\r\n    signingConfigs{\r\n        normal{\r\n            keyAlias \"sampleapplication\"\r\n            keyPassword \"123456789\"\r\n            storeFile file(\"sampleapp.jks\")\r\n            storePassword \"123456789\"\r\n        }\r\n    }\r\n}\r\n<\/code><\/pre>\n<p>\u7c21\u5358\u306a\u8a18\u8ff0\u3060\u3051\u3067Build&gt;Generate Signed APK&#8230;\u304b\u3089\u3001\u6bce\u56de\u5b9f\u884c\u3057\u3066\u3044\u305f<br \/>\n\u30d1\u30b9\u306a\u3069\u306e\u5165\u529b\u3092\u7701\u304f\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u3059\u3054\u304f\u4fbf\u5229\u3067\u3059<\/p>\n<h3>\u7d42\u308f\u308a\u306b<\/h3>\n<p>\u4eca\u56de\u7d39\u4ecb\u3057\u305f\u958b\u767a\u4e2d\u306b\u4fbf\u5229\u3068\u601d\u3063\u305f\u6a5f\u80fd\u306fgradle\u306e\u307b\u3093\u306e\u4e00\u90e8\u5206\u3067\u3059<br \/>\n gradle\u3092\u5b66\u7fd2\u3059\u308b\u3053\u3068\u3067\u3001\u3055\u3089\u306b\u958b\u767a\u306e\u52b9\u7387\u5316\u3092\u3057\u3066\u3044\u304d\u305f\u3044\u3067\u3059<\/p>\n<p>\u706b\u66dc\u65e5\u62c5\u5f53\uff1apoppy<\/p>\n<div class='wp_social_bookmarking_light'>\n            <div class=\"wsbl_google_plus_one\"><g:plusone size=\"medium\" annotation=\"none\" href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/5990\" ><\/g:plusone><\/div>\n            <div class=\"wsbl_hatena_button\"><a href=\"\/\/b.hatena.ne.jp\/entry\/https:\/\/www.gigas-jp.com\/appnews\/archives\/5990\" class=\"hatena-bookmark-button\" data-hatena-bookmark-title=\"AndroidStudio\u306egradle\" data-hatena-bookmark-layout=\"standard\" title=\"\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0\"> <img src=\"\/\/b.hatena.ne.jp\/images\/entry-button\/button-only@2x.png\" alt=\"\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0\" width=\"20\" height=\"20\" style=\"border: none;\" \/><\/a><script type=\"text\/javascript\" src=\"\/\/b.hatena.ne.jp\/js\/bookmark_button.js\" charset=\"utf-8\" async=\"async\"><\/script><\/div>\n            <div class=\"wsbl_twitter\"><a href=\"https:\/\/twitter.com\/share\" class=\"twitter-share-button\" data-url=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/5990\" data-text=\"AndroidStudio\u306egradle\" data-via=\"GIGASJAPAN_APPS\" data-lang=\"ja\">Tweet<\/a><\/div>\n            <div class=\"wsbl_facebook_like\"><div id=\"fb-root\"><\/div><fb:like href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/5990\" layout=\"button_count\" action=\"like\" width=\"100\" share=\"false\" show_faces=\"false\" ><\/fb:like><\/div>\n            <div class=\"wsbl_facebook_send\"><div id=\"fb-root\"><\/div><fb:send href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/5990\" colorscheme=\"light\" ><\/fb:send><\/div>\n    <\/div>\n<br class='wp_social_bookmarking_light_clear' \/>\n","protected":false},"excerpt":{"rendered":"<p>AndroidStudio\u306egradle\u3067\u958b\u767a\u4e2d\u306b\u4fbf\u5229\u3068\u601d\u3063\u305f\u6a5f\u80fd\u3092\u3044\u304f\u3064\u304b\u7d39\u4ecb\u3057\u3066\u3044\u304d\u307e\u3059 \u4eca\u56de\u306fbuild.gradle\u306e\u4e2d\u306e\u6a5f\u80fd\u3068\u306a\u308a\u307e\u3059<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[100,12],"tags":[56,79,124],"acf":[],"_links":{"self":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/5990"}],"collection":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/comments?post=5990"}],"version-history":[{"count":8,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/5990\/revisions"}],"predecessor-version":[{"id":5998,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/5990\/revisions\/5998"}],"wp:attachment":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/media?parent=5990"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/categories?post=5990"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/tags?post=5990"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}