回答編集履歴

1

こちらの環境で変更したファイルの内容と、動作確認をした実機情報を追記しました。

2017/09/14 01:01

投稿

mingos
mingos

スコア4025

test CHANGED
@@ -47,3 +47,165 @@
47
47
  ・アプリを終了する
48
48
 
49
49
  ・Googleドライブアプリでファイルが保存されている事を確認する
50
+
51
+
52
+
53
+ ---
54
+
55
+
56
+
57
+ ## 追記
58
+
59
+
60
+
61
+ こちらで変更したファイルの内容を追記します。
62
+
63
+
64
+
65
+ 実機は、Xperia X Performance (SOV33)でAndroid 7.0で動作確認しました。
66
+
67
+
68
+
69
+ * build.gradle
70
+
71
+ ```
72
+
73
+ // Top-level build file where you can add configuration options common to all sub-projects/modules.
74
+
75
+ buildscript {
76
+
77
+ repositories {
78
+
79
+ jcenter()
80
+
81
+ }
82
+
83
+ dependencies {
84
+
85
+ classpath 'com.android.tools.build:gradle:2.3.3'
86
+
87
+
88
+
89
+ // NOTE: Do not place your application dependencies here; they belong
90
+
91
+ // in the individual module build.gradle files
92
+
93
+ }
94
+
95
+ }
96
+
97
+
98
+
99
+ allprojects {
100
+
101
+ repositories {
102
+
103
+ jcenter()
104
+
105
+ }
106
+
107
+ }
108
+
109
+ ```
110
+
111
+
112
+
113
+ * app/build.gradle
114
+
115
+ ```
116
+
117
+ apply plugin: 'com.android.application'
118
+
119
+
120
+
121
+ android {
122
+
123
+ compileSdkVersion 25
124
+
125
+ buildToolsVersion '25.0.0'
126
+
127
+
128
+
129
+ defaultConfig {
130
+
131
+ applicationId "com.google.android.gms.drive.sample.quickstart"
132
+
133
+ minSdkVersion 19
134
+
135
+ targetSdkVersion 23
136
+
137
+ versionCode 1
138
+
139
+ versionName "1.0"
140
+
141
+ }
142
+
143
+ buildTypes {
144
+
145
+ release {
146
+
147
+ minifyEnabled false
148
+
149
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
150
+
151
+ }
152
+
153
+ }
154
+
155
+ }
156
+
157
+
158
+
159
+ dependencies {
160
+
161
+ compile fileTree(dir: 'libs', include: ['*.jar'])
162
+
163
+ compile 'com.android.support:appcompat-v7:25.3.1'
164
+
165
+
166
+
167
+ // Include lower level libraries if you are using Google Play services v6.5 or
168
+
169
+ // greater. Details of the client libs can be found at https://goo.gl/jKNdLm.
170
+
171
+ compile 'com.google.android.gms:play-services-drive:11.0.4'
172
+
173
+ }
174
+
175
+ ```
176
+
177
+ * gradle/wrapper/gradle-wrapper.properties
178
+
179
+ ```
180
+
181
+ #Tue Sep 12 12:32:03 GMT+09:00 2017
182
+
183
+ distributionBase=GRADLE_USER_HOME
184
+
185
+ distributionPath=wrapper/dists
186
+
187
+ zipStoreBase=GRADLE_USER_HOME
188
+
189
+ zipStorePath=wrapper/dists
190
+
191
+ distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
192
+
193
+ ```
194
+
195
+
196
+
197
+ 初回起動時はアカウントの選択後に、アプリの許可を出すダイアログも出ます。
198
+
199
+ 2回目は出ませんが、GoogleのWebページからアカウント>接続済みのアプリとサイトの
200
+
201
+ アプリの管理から削除すると、また表示させる事が出来ます。
202
+
203
+
204
+
205
+ こちらではこのような動作をしました。
206
+
207
+ ![イメージ説明](5866702d7bdab269d7c42997c0d91f50.png)
208
+
209
+
210
+
211
+