teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

2

gradleの追加

2017/12/07 02:34

投稿

giant
giant

スコア132

title CHANGED
File without changes
body CHANGED
@@ -26,7 +26,9 @@
26
26
  ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
27
27
 
28
28
  追記でアプリレベルのgradleファイルです。どうぞよろしくお願いします。
29
+
29
30
  ```
31
+
30
32
  apply plugin: 'com.android.application'
31
33
 
32
34
 
@@ -65,10 +67,12 @@
65
67
 
66
68
  }
67
69
  apply plugin: 'com.google.gms.google-services'
68
- ``
69
70
 
71
+ ```
70
72
 
73
+
71
74
  //projectレベルのgradleファイルです。
75
+ ```
72
76
  // Top-level build file where you can add configuration options common to all sub-projects/modules.
73
77
 
74
78
  buildscript {
@@ -105,4 +109,5 @@
105
109
 
106
110
  task clean(type: Delete) {
107
111
  delete rootProject.buildDir
108
- }
112
+ }
113
+ ```

1

gradleファイルの追記

2017/12/07 02:34

投稿

giant
giant

スコア132

title CHANGED
File without changes
body CHANGED
@@ -21,4 +21,88 @@
21
21
  maven {
22
22
  url "https://maven.google.com" // Google's Maven repository
23
23
  }
24
- ```
24
+ ```
25
+
26
+ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
27
+
28
+ 追記でアプリレベルのgradleファイルです。どうぞよろしくお願いします。
29
+ ```
30
+ apply plugin: 'com.android.application'
31
+
32
+
33
+ android {
34
+ compileSdkVersion 26
35
+ defaultConfig {
36
+ applicationId "com.example.android.sample.ttttt"
37
+ minSdkVersion 23
38
+ targetSdkVersion 26
39
+ versionCode 1
40
+ versionName "1.0"
41
+ testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
42
+ }
43
+ buildTypes {
44
+ release {
45
+ minifyEnabled false
46
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
47
+ }
48
+ }
49
+ }
50
+
51
+ dependencies {
52
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
53
+ implementation 'com.android.support:appcompat-v7:26.1.0'
54
+ implementation 'com.android.support.constraint:constraint-layout:1.0.2'
55
+ testImplementation 'junit:junit:4.12'
56
+ androidTestImplementation 'com.android.support.test:runner:1.0.1'
57
+ androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
58
+
59
+
60
+
61
+ compile 'com.google.firebase:firebase-core:11.6.2'
62
+
63
+
64
+
65
+
66
+ }
67
+ apply plugin: 'com.google.gms.google-services'
68
+ ``
69
+
70
+
71
+ //projectレベルのgradleファイルです。
72
+ // Top-level build file where you can add configuration options common to all sub-projects/modules.
73
+
74
+ buildscript {
75
+
76
+ repositories {
77
+ google()
78
+ jcenter()
79
+ }
80
+ dependencies {
81
+ classpath 'com.android.tools.build:gradle:3.0.0'
82
+
83
+ classpath 'com.google.gms:google-services:3.1.1' // google-services plugin
84
+
85
+
86
+
87
+
88
+ // classpath 'com.google.gms:google-services:3.1.0'
89
+ // NOTE: Do not place your application dependencies here; they belong
90
+ // in the individual module build.gradle files
91
+ }
92
+ }
93
+
94
+ allprojects {
95
+ repositories {
96
+ google()
97
+ jcenter()
98
+
99
+
100
+ maven {
101
+ url "https://maven.google.com" // Google's Maven repository
102
+ }
103
+ }
104
+ }
105
+
106
+ task clean(type: Delete) {
107
+ delete rootProject.buildDir
108
+ }