質問編集履歴

5

誤字の修正

2021/07/17 02:12

投稿

kokokokokoko
kokokokokoko

スコア0

test CHANGED
File without changes
test CHANGED
@@ -202,7 +202,7 @@
202
202
 
203
203
  defaultConfig {
204
204
 
205
- applicationId "com.mikuxperia.clockwidget.mikuclock"
205
+ applicationId "com.test.clockwidget.mikuclock"
206
206
 
207
207
  minSdkVersion 21
208
208
 

4

書式の改善

2021/07/17 02:12

投稿

kokokokokoko
kokokokokoko

スコア0

test CHANGED
File without changes
test CHANGED
@@ -40,7 +40,9 @@
40
40
 
41
41
  ### 該当のソースコード
42
42
 
43
- #clock.kt
43
+ ```kotlin
44
+
45
+ コードの表示(ブロック)
44
46
 
45
47
  package com.test.testkwidget.clock
46
48
 
@@ -112,9 +114,11 @@
112
114
 
113
115
  }
114
116
 
115
-
117
+ ```
116
-
118
+
119
+
120
+
117
- # gradle(Project)
121
+ ```gradle
118
122
 
119
123
  // Top-level build file where you can add configuration options common to all sub-projects/modules.
120
124
 
@@ -170,6 +174,12 @@
170
174
 
171
175
 
172
176
 
177
+ ```
178
+
179
+
180
+
181
+ ```gradle
182
+
173
183
  # gradle(Module)
174
184
 
175
185
  plugins {
@@ -244,6 +254,8 @@
244
254
 
245
255
 
246
256
 
257
+
258
+
247
259
  implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
248
260
 
249
261
  implementation 'androidx.core:core-ktx:1.6.0'
@@ -260,6 +272,10 @@
260
272
 
261
273
  }
262
274
 
275
+
276
+
277
+ ```
278
+
263
279
  ```ここに言語名を入力
264
280
 
265
281
  kotlin 1.4.32

3

ソースコードにGradleを追加しました

2021/07/17 02:10

投稿

kokokokokoko
kokokokokoko

スコア0

test CHANGED
File without changes
test CHANGED
@@ -40,6 +40,8 @@
40
40
 
41
41
  ### 該当のソースコード
42
42
 
43
+ #clock.kt
44
+
43
45
  package com.test.testkwidget.clock
44
46
 
45
47
 
@@ -110,6 +112,154 @@
110
112
 
111
113
  }
112
114
 
115
+
116
+
117
+ # gradle(Project)
118
+
119
+ // Top-level build file where you can add configuration options common to all sub-projects/modules.
120
+
121
+ buildscript {
122
+
123
+ ext.kotlin_version = "1.4.32"
124
+
125
+ repositories {
126
+
127
+ google()
128
+
129
+ jcenter()
130
+
131
+ }
132
+
133
+ dependencies {
134
+
135
+ classpath "com.android.tools.build:gradle:4.1.3"
136
+
137
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
138
+
139
+
140
+
141
+ // NOTE: Do not place your application dependencies here; they belong
142
+
143
+ // in the individual module build.gradle files
144
+
145
+ }
146
+
147
+ }
148
+
149
+
150
+
151
+ allprojects {
152
+
153
+ repositories {
154
+
155
+ google()
156
+
157
+ jcenter()
158
+
159
+ }
160
+
161
+ }
162
+
163
+
164
+
165
+ task clean(type: Delete) {
166
+
167
+ delete rootProject.buildDir
168
+
169
+ }
170
+
171
+
172
+
173
+ # gradle(Module)
174
+
175
+ plugins {
176
+
177
+ id 'com.android.application'
178
+
179
+ id 'kotlin-android'
180
+
181
+ }
182
+
183
+
184
+
185
+ android {
186
+
187
+ compileSdkVersion 30
188
+
189
+ buildToolsVersion "30.0.3"
190
+
191
+
192
+
193
+ defaultConfig {
194
+
195
+ applicationId "com.mikuxperia.clockwidget.mikuclock"
196
+
197
+ minSdkVersion 21
198
+
199
+ targetSdkVersion 30
200
+
201
+ versionCode 1
202
+
203
+ versionName "1.0"
204
+
205
+
206
+
207
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
208
+
209
+ }
210
+
211
+
212
+
213
+ buildTypes {
214
+
215
+ release {
216
+
217
+ minifyEnabled false
218
+
219
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
220
+
221
+ }
222
+
223
+ }
224
+
225
+ compileOptions {
226
+
227
+ sourceCompatibility JavaVersion.VERSION_1_8
228
+
229
+ targetCompatibility JavaVersion.VERSION_1_8
230
+
231
+ }
232
+
233
+ kotlinOptions {
234
+
235
+ jvmTarget = '1.8'
236
+
237
+ }
238
+
239
+ }
240
+
241
+
242
+
243
+ dependencies {
244
+
245
+
246
+
247
+ implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
248
+
249
+ implementation 'androidx.core:core-ktx:1.6.0'
250
+
251
+ implementation 'androidx.appcompat:appcompat:1.3.0'
252
+
253
+ implementation 'com.google.android.material:material:1.4.0'
254
+
255
+ testImplementation 'junit:junit:4.+'
256
+
257
+ androidTestImplementation 'androidx.test.ext:junit:1.1.3'
258
+
259
+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
260
+
261
+ }
262
+
113
263
  ```ここに言語名を入力
114
264
 
115
265
  kotlin 1.4.32

2

題名の修正

2021/07/16 16:15

投稿

kokokokokoko
kokokokokoko

スコア0

test CHANGED
@@ -1 +1 @@
1
- Kotlin onCreateできない
1
+ Kotlin onCreateをオーバーライドできない
test CHANGED
File without changes

1

誤字の修正

2021/07/16 12:01

投稿

kokokokokoko
kokokokokoko

スコア0

test CHANGED
File without changes
test CHANGED
@@ -134,4 +134,4 @@
134
134
 
135
135
 
136
136
 
137
- Android Studio 4
137
+ Android Studio 4.1.3