Recommended
PDF
PDF
2015年のAndroidアプリ開発入門 - ABCD 2015 Kanazawa
PDF
PPTX
PPTX
PDF
Android Studio First Step Guide
PDF
minneにおけるテスト〜リリース〜リリース後にやっている事の紹介
PDF
What is tested by pre-launch (security) reports?
PDF
20150425 DroidKaigi つかえるGradleプロジェクトの作り方
PDF
Android lint-srp-practice
PDF
Android Dev Tools Knowledge
PDF
はじめる前に知っておきたいAndroidアプリ開発のポイント
PDF
はてなにおける Android アプリのソフトウェアテスト
PDF
あるゲームアプリケーションの構成とアップデートサイクル
PDF
DroidKaigi2016 windows環境での効率的なアプリ開発手法
PDF
Android学ぶを君へ。生き抜くためのナレッジ共有
PDF
Android StudioではじめるAndroidアプリケーション実践入門 先生:日高 正博
PDF
Androidのセキュア開発について考えてみた(明日、敗訴しないためのセキュアコーディング.ver2)
PDF
remote Docker over SSHが熱い
PDF
PDF
DroidKaigi - Welcome talk
PDF
5 年続く 「はてなブックマーク」 アプリを継続開発する技術
PPTX
GBDC 勉強会 #2 Android Studio 実践レポート
PDF
【16-D-4】3分ではじめるスマホアプリのビジュアル開発
PPTX
HTML5/JavaScriptで作るAndroidアプリ開発seminar
PPTX
Androidアプリケーション応用 WebAPI開発
PDF
PDF
PDF
Developers Summit 2017 17-A-7 執筆を支える技術と技術書のトレンド
PDF
2015年度春学期 統計学 第14回 分布についての仮説を検証する ― 仮説検定 (2015. 7. 16, 23)
More Related Content
PDF
PDF
2015年のAndroidアプリ開発入門 - ABCD 2015 Kanazawa
PDF
PPTX
PPTX
PDF
Android Studio First Step Guide
PDF
minneにおけるテスト〜リリース〜リリース後にやっている事の紹介
PDF
What is tested by pre-launch (security) reports?
What's hot
PDF
20150425 DroidKaigi つかえるGradleプロジェクトの作り方
PDF
Android lint-srp-practice
PDF
Android Dev Tools Knowledge
PDF
はじめる前に知っておきたいAndroidアプリ開発のポイント
PDF
はてなにおける Android アプリのソフトウェアテスト
PDF
あるゲームアプリケーションの構成とアップデートサイクル
PDF
DroidKaigi2016 windows環境での効率的なアプリ開発手法
PDF
Android学ぶを君へ。生き抜くためのナレッジ共有
PDF
Android StudioではじめるAndroidアプリケーション実践入門 先生:日高 正博
PDF
Androidのセキュア開発について考えてみた(明日、敗訴しないためのセキュアコーディング.ver2)
PDF
remote Docker over SSHが熱い
PDF
PDF
DroidKaigi - Welcome talk
PDF
5 年続く 「はてなブックマーク」 アプリを継続開発する技術
PPTX
GBDC 勉強会 #2 Android Studio 実践レポート
PDF
【16-D-4】3分ではじめるスマホアプリのビジュアル開発
PPTX
HTML5/JavaScriptで作るAndroidアプリ開発seminar
PPTX
Androidアプリケーション応用 WebAPI開発
PDF
PDF
Viewers also liked
PDF
Developers Summit 2017 17-A-7 執筆を支える技術と技術書のトレンド
PDF
2015年度春学期 統計学 第14回 分布についての仮説を検証する ― 仮説検定 (2015. 7. 16, 23)
PDF
PDF
Android Studio Pluginを使ってみた
PPTX
PDF
20101024 3min cooking in Yokohama android
PPTX
KVI白熱教室Vol.4「刺さるプレゼン」20140521
PPTX
Android組込み開発基礎コース Armadillo-440編
PDF
Androidアプリ開発で活躍必至!? ビルドツールGradle
PDF
Cocos2d-x によるスマートフォンアプリ開発のこれまでとこれから
PDF
Xamarin と Visual Studio でまとめて作る iOS / Android / Windows アプリ ( Developers Summ...
PPTX
PDF
Eric Ries at Startup Lessons Learned sllconf 2011 - Japanese Translation
PDF
Lean startup whatisMVP_jp
PPTX
PPTX
オープンソースによるドローン開発の概要( #ABC2015S )
PDF
コンテンツマーケティングの正しい活用方法 心を動かすオウンドメディアのつくり方 Ver.02
PDF
日経BPリーン式創業塾 #leanstartup #リーンスタートアップ
PPTX
ちゃんとした C# プログラムを書けるようになる実践的な方法~ Visual Studio を使った 高品質・低コスト・保守性の高い開発
PDF
新規事業・起業を妨げる「ビジネスモデル症候群」とは
Similar to Android Studioの魅力
PDF
つ部 Android Studio 勉強会 12/7
PDF
Android App Development with Gradle & Android Studio
PDF
Google I/O 2013 報告会 Android Studio と Gradle
PDF
PDF
Android アプリ開発における Gradle ビルドシステム
PPT
PPTX
Android 開発, 運用時に使いたいライブラリやサービスの紹介
PDF
PDF
爆速でAndroidアプリを ビルドするための仕組み DeNA TechCon #denatechcon
PDF
Eclipse ADTとAndroidStudio両方で動かせる開発環境構築
PPT
PDF
PDF
Google IO 2012 つまみ食い(1) ADT r20 の新機能
PDF
PDF
JellyBeanのソースをとりあえず眺めてみた(手抜き)
PPTX
Xamarin 101 ~環境構築からビルド・テストまで~
PDF
JRebel for Android 1.0 を試食してみた
PPTX
PDF
Gws 20130315 gradle_handson
PDF
Kotlin/Native 「使ってみた」の一歩先へ
More from Keiji Ariyama
PPTX
Vuzix Developer Conference
PDF
Vuzix developer conference - M100アプリ開発
PDF
PDF
Google Cloud Endpointsによる API構築
PDF
Google Mirror API勉強会 20130607
PDF
PDF
Android Studioの魅力 1. 2. 3. 4. 5. 6. 7. Android Studioの変遷 ∼ 1.0
7
2013/05 : I/O Preview
2013/07 : 0.2.0
2013/09/16 : 0.2.9
2013/09/24 : 0.2.10
2013/10/18 : 0.3
2013/12/18 : 0.4
2014/03/06 : 0.5
2014/06/06 : 0.6
2014/06/27 : BETA
2014/07/13 : 0.8.2
2014/10/29 : 0.8.14
2014/10/31 : 0.9
2014/11/20 : RC1
2014/12/08 : 1.0 Release
8. 9. 10. 11. 12. 13. 14. 15. 16. 17. Android Studioの変遷 1.0 ∼
17
2014/12/08 : 1.0 Release
2015/01/15 : 1.1 Preview 1
2015/01/29 : 1.1 Beta
2015/02/11 : 1.1 RC1
2015/02/18 : 1.1 Release
2015/03/09 : 1.2 Preview 1
2015/04/02 : 1.2 Beta
2015/04/21 : 1.2 RC1
2015/04/30 : 1.2 Release
2015/05/30 : 1.3 Preview 1
2015/06/10 : 1.2.2 Release
2015/06/19 : 1.3 Beta
2015/07/17 : 1.3 RC3
18. 2014/12/08 : 1.0 Release
2015/01/15 : 1.1 Preview 1
2015/01/29 : 1.1 Beta
2015/02/11 : 1.1 RC1
2015/02/18 : 1.1 Release
2015/03/09 : 1.2 Preview 1
2015/04/02 : 1.2 Beta
2015/04/21 : 1.2 RC1
2015/04/30 : 1.2 Release
2015/05/30 : 1.3 Preview 1
2015/06/10 : 1.2.2 Release
2015/06/19 : 1.3 Beta
2015/07/17 : 1.3 RC3
Android Studio 1.3 RC3
19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. Parcelable Generation
protected WiFiApSetting(Parcel in) {
id = in.readLong();
ssid = in.readString();
security = in.readInt();
password = in.readString();
lastUsedDate = in.readLong();
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeLong(id);
dest.writeString(ssid);
dest.writeInt(security);
dest.writeString(password);
dest.writeLong(lastUsedDate);
}
@Override
public int describeContents() {
return 0;
}
public static final Creator<WiFiApSetting> CREATOR = new Creator<WiFiApSetting>() {
@Override
public WiFiApSetting createFromParcel(Parcel in) {
return new WiFiApSetting(in);
}
@Override
public WiFiApSetting[] newArray(int size) {
return new WiFiApSetting[size];
}
};
31
32. 33. 34. 35. 36. dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile project(':wifiapmanager')
compile 'com.android.support:design:22.2.0'
compile 'com.android.support:recyclerview-v7:22.2.0'
compile 'com.android.support:cardview-v7:22.2.0'
compile 'com.jakewharton:butterknife:6.1.0'
compile 'com.github.bumptech.glide:glide:3.6.0'
compile 'de.greenrobot:eventbus:2.4.0'
compile 'io.realm:realm-android:0.80.3'
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3.1'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1'
}
LeakCanary
build.gradle
36
37. 38. 39. 40. apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "jp.co.c_lis.kehai.android"
minSdkVersion 15
targetSdkVersion 22
versionCode 32
versionName "0.3.2"
}
buildTypes {
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile project(':wifiapmanager')
compile 'com.android.support:design:22.2.1'
compile 'com.android.support:recyclerview-v7:22.2.1'
compile 'com.android.support:cardview-v7:22.2.1'
}
build.gradle
40
build.gradle
41. 42. def gitSha() {
return 'git rev-parse --short HEAD'.execute().text.trim()
}
android {
buildTypes {
debug {
minifyEnabled false
versionNameSuffix ' (' + gitSha() + ')'
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
build.gradle
42
build.gradle
43. /**
* Automatically generated file. DO NOT MODIFY
*/
package io.keiji.kehai;
public final class BuildConfig {
public static final boolean DEBUG = Boolean.parseBoolean("true");
public static final String APPLICATION_ID =
"jp.co.c_lis.kehai.android";
public static final String BUILD_TYPE = "debug";
public static final String FLAVOR = "defaultFlavor";
public static final int VERSION_CODE = 32;
public static final String VERSION_NAME = "0.3.2 (837c123)";
}
BuildConfig
43
build/generated/source/buildConfig/…/BuildConfig.java
44. android {
defaultConfig {
applicationId "jp.co.c_lis.kehai.android"
minSdkVersion 15
targetSdkVersion 22
versionCode 32
versionName "0.3.2"
buildConfigField "String", "TEST", ""MEGANEKKO""
}
}
BuildConfigのフィールド
44
build.gradle
45. /**
* Automatically generated file. DO NOT MODIFY
*/
package io.keiji.kehai;
public final class BuildConfig {
public static final boolean DEBUG = Boolean.parseBoolean("true");
public static final String APPLICATION_ID =
"jp.co.c_lis.kehai.android";
public static final String BUILD_TYPE = "debug";
public static final String FLAVOR = "defaultFlavor";
public static final int VERSION_CODE = 32;
public static final String VERSION_NAME = "0.3.2 (837c123)";
// Fields from default config.
public static final String TEST = "MEGANEKKO";
}
BuildConfigのフィールド
45
build/generated/source/buildConfig/…/BuildConfig.java
46. リソース
android {
defaultConfig {
applicationId "jp.co.c_lis.kehai.android"
minSdkVersion 15
targetSdkVersion 22
versionCode 32
versionName "0.3.2"
resValue "string", "res_value_test", "hello gradle"
}
}
46
build/generated/res/generated/…/values/generated.xml
47. 48. 49. Build Types
android {
buildTypes {
debug {
minifyEnabled false
versionNameSuffix ' (' + gitSha() + ')'
proguardFiles getDefaultProguardFile('proguard-
android.txt'), 'proguard-rules.pro'
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-
android.txt'), 'proguard-rules.pro'
}
}
}
49
build.gradle
50. 51. 52. Product Flavors
package io.keiji.kehai;
public enum OssLibrary {
MaterialIcons("Material icons", "license_creative_commons-4.0.txt"),
AOSP("Android Open Source Project", "license_aosp.txt"),
V7Support("Android v7 Support Libraries", "license_aosp.txt"),
DesignSupport("Android Design Support Library", "license_aosp.txt"),
Glide("Glide", "license_glide.txt"),
ButterKnife("Butter Knife", "license_butterknife.txt"),
EventBus("EventBus", "license_eventbus.txt"),
Realm("Realm", "license_realm.txt");
public final String name;
public final String fileName;
OssLibrary(String name, String file) {
this.name = name;
fileName = file;
}
}
52
src/main/io.keij.kehai/OssLibrary.java
53. 54. 55. Product Flavors
package io.keiji.kehai;
public enum OssLibrary {
Nothing("", "");
public final String name;
public final String fileName;
OssLibrary(String name, String file) {
this.name = name;
fileName = file;
}
}
55
src/forBetaTesting/io.keij.kehai/OssLibrary.java
56. 57. 58. 59. android {
splits {
density {
enable true
exclude "ldpi", "tvdpi", "xxxhdpi"
compatibleScreens 'small', 'normal', 'large', 'xlarge'
}
}
}
APK Splits
59
http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
build.gradle
60. 61. APK Splits Sample
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "jp.co.c_lis.apkspritsample"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}
build.gradle
61
62. APK Splits Sample
splits {
density {
enable true
exclude "ldpi", "tvdpi", "xxxhdpi"
compatibleScreens 'small', 'normal', 'large', 'xlarge'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}
build.gradle
62
63. APK Splits Sample
$ ./gradlew assemble
Parallel execution is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:
:
:app:assembleRelease
:app:assemble
BUILD SUCCESSFUL
63
64. 65. 66. APK Splits Sample
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="jp.co.c_lis.apkspritsample"
platformBuildVersionCode="22"
platformBuildVersionName="5.1.1-1819727">
<compatible-screens>
<screen
android:screenDensity="hdpi"
android:screenSize="small" />
<screen
android:screenDensity="hdpi"
android:screenSize="large" />
<screen
android:screenDensity="hdpi"
android:screenSize="xlarge" />
<screen
android:screenDensity="hdpi"
android:screenSize="normal" />
</compatible-screens>
AndroidManifest.xml
66
67. 68. 69. Android Studioの今後
dev branch release branch IntelliJ Notes
studio-1.2-dev studio-1.2-release idea14-1.2-dev CLOSED
studio-1.3-dev studio-1.3-release idea14-1.3-dev BUG FIX ONLY
studio-1.4-dev idea14-1.4-dev for 1.4 work
studio-master-dev studio-master-dev idea14-dev for post 1.4 work
http://tools.android.com/build#TOC-Branches
69
70. • プロジェクトのファイル構成を変更
• main/java/…
• androidTest/java/…
• AndroidManifest.xmlの設定をbuild.gradleに移行
• applicationId / *SdkVersion / versionCode / versionName
• 依存関係をdependenciesに記載
ADT から Studioへの移行
70
http://tools.android.com/tech-docs/new-build-system/migrating-from-eclipse-projects
71. • ADT側でExport →「Generate Gradle build files」
• Studio側でImport
ADT から Studioへの移行
71
http://tools.android.com/tech-docs/new-build-system/migrating-from-eclipse-projects
72. • ADT側でExport →「Generate Gradle build files
• Studio側で
http://tools.android.com/tech-docs/new-build-system/migrating-from-eclipse-projects
ADT から Studioへの移行
72
73. 74. 75. 76. 77. 78. 意図しないバージョンアップ
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile project(':wifiapmanager')
compile 'com.android.support:design:22.2.0'
compile 'com.android.support:recyclerview-v7:22.2.0'
compile 'com.android.support:cardview-v7:22.2.0'
compile 'com.jakewharton:butterknife:6.1.0'
compile 'com.github.bumptech.glide:glide:3.6.0'
compile 'de.greenrobot:eventbus:2.4.0'
compile 'io.realm:realm-android:+'
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3.1'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-
op:1.3.1'
}
78
build.gradle
バージョンは固定すること!
79.