質問編集履歴
1
文章の追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -52,34 +52,7 @@
|
|
52
52
|
```Java
|
53
53
|
package com.example.alertappfyp2.ui.login;
|
54
54
|
|
55
|
-
import androidx.annotation.NonNull;
|
56
|
-
import androidx.appcompat.app.AppCompatActivity;
|
57
55
|
|
58
|
-
|
59
|
-
import android.content.Intent;
|
60
|
-
import android.os.Bundle;
|
61
|
-
import android.provider.ContactsContract;
|
62
|
-
import android.view.View;
|
63
|
-
import android.view.WindowManager;
|
64
|
-
import android.widget.Button;
|
65
|
-
import android.widget.Toast;
|
66
|
-
|
67
|
-
|
68
|
-
import com.example.alertappfyp2.R;
|
69
|
-
import com.google.android.gms.auth.api.signin.GoogleSignIn;
|
70
|
-
import com.google.android.gms.auth.api.signin.GoogleSignInAccount;
|
71
|
-
import com.google.android.gms.auth.api.signin.GoogleSignInClient;
|
72
|
-
import com.google.android.gms.auth.api.signin.GoogleSignInOptions;
|
73
|
-
import com.google.android.gms.common.api.ApiException;
|
74
|
-
import com.google.android.gms.tasks.OnCompleteListener;
|
75
|
-
import com.google.android.gms.tasks.Task;
|
76
|
-
import com.google.firebase.auth.AuthCredential;
|
77
|
-
import com.google.firebase.auth.AuthResult;
|
78
|
-
import com.google.firebase.auth.FirebaseAuth;
|
79
|
-
import com.google.firebase.auth.FirebaseUser;
|
80
|
-
import com.google.firebase.auth.GoogleAuthProvider;
|
81
|
-
|
82
|
-
|
83
56
|
public class LoginActivity extends AppCompatActivity {
|
84
57
|
|
85
58
|
|
@@ -203,39 +176,7 @@
|
|
203
176
|
```
|
204
177
|
|
205
178
|
```Java
|
206
|
-
package com.example.alertappfyp2;
|
207
179
|
|
208
|
-
import android.content.Intent;
|
209
|
-
import android.os.Bundle;
|
210
|
-
|
211
|
-
import androidx.annotation.NonNull;
|
212
|
-
import androidx.appcompat.app.AppCompatActivity;
|
213
|
-
|
214
|
-
import com.bumptech.glide.Glide;
|
215
|
-
import com.google.android.gms.auth.api.signin.GoogleSignIn;
|
216
|
-
import com.google.android.gms.auth.api.signin.GoogleSignInAccount;
|
217
|
-
import com.google.android.gms.auth.api.signin.GoogleSignInClient;
|
218
|
-
import com.google.android.gms.auth.api.signin.GoogleSignInOptions;
|
219
|
-
import com.google.android.gms.tasks.OnCompleteListener;
|
220
|
-
import com.google.android.gms.tasks.Task;
|
221
|
-
import com.google.android.material.snackbar.Snackbar;
|
222
|
-
|
223
|
-
import androidx.viewpager.widget.ViewPager;
|
224
|
-
|
225
|
-
import android.view.Menu;
|
226
|
-
import android.view.MenuItem;
|
227
|
-
import android.view.View;
|
228
|
-
|
229
|
-
import android.widget.Button;
|
230
|
-
import android.widget.ImageView;
|
231
|
-
import android.widget.TextView;
|
232
|
-
import android.widget.Toast;
|
233
|
-
|
234
|
-
import com.example.alertappfyp2.ui.main.SectionsPagerAdapter;
|
235
|
-
import com.google.firebase.auth.AuthResult;
|
236
|
-
import com.google.firebase.auth.FirebaseAuth;
|
237
|
-
import com.google.firebase.auth.FirebaseUser;
|
238
|
-
|
239
180
|
public class MyPage extends AppCompatActivity {
|
240
181
|
|
241
182
|
ImageView img;
|
@@ -278,6 +219,87 @@
|
|
278
219
|
|
279
220
|
```
|
280
221
|
|
222
|
+
```grade
|
223
|
+
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
224
|
+
|
225
|
+
buildscript {
|
226
|
+
repositories {
|
227
|
+
google()
|
228
|
+
jcenter()
|
229
|
+
|
230
|
+
}
|
231
|
+
dependencies {
|
232
|
+
classpath 'com.android.tools.build:gradle:4.1.2'
|
233
|
+
classpath 'com.google.gms:google-services:4.3.5'
|
234
|
+
|
235
|
+
// NOTE: Do not place your application dependencies here; they belong
|
236
|
+
// in the individual module build.gradle files
|
237
|
+
}
|
238
|
+
}
|
239
|
+
|
240
|
+
allprojects {
|
241
|
+
repositories {
|
242
|
+
google()
|
243
|
+
jcenter()
|
244
|
+
|
245
|
+
}
|
246
|
+
}
|
247
|
+
|
248
|
+
```
|
249
|
+
|
250
|
+
```grade
|
251
|
+
apply plugin: 'com.android.application'
|
252
|
+
|
253
|
+
android {
|
254
|
+
compileSdkVersion 29
|
255
|
+
buildToolsVersion "29.0.2"
|
256
|
+
defaultConfig {
|
257
|
+
applicationId "com.example.alertappfyp2"
|
258
|
+
minSdkVersion 29
|
259
|
+
targetSdkVersion 29
|
260
|
+
versionCode 1
|
261
|
+
versionName "1.0"
|
262
|
+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
263
|
+
vectorDrawables.useSupportLibrary = true
|
264
|
+
}
|
265
|
+
buildTypes {
|
266
|
+
release {
|
267
|
+
minifyEnabled false
|
268
|
+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
269
|
+
}
|
270
|
+
}
|
271
|
+
}
|
272
|
+
|
273
|
+
dependencies {
|
274
|
+
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
275
|
+
implementation 'androidx.appcompat:appcompat:1.0.2'
|
276
|
+
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
277
|
+
implementation 'com.google.android.material:material:1.0.0'
|
278
|
+
implementation 'androidx.annotation:annotation:1.0.2'
|
279
|
+
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
280
|
+
implementation 'androidx.preference:preference:1.1.0-alpha05'
|
281
|
+
implementation 'androidx.vectordrawable:vectordrawable:1.0.1'
|
282
|
+
implementation 'androidx.navigation:navigation-fragment:2.0.0'
|
283
|
+
implementation 'androidx.navigation:navigation-ui:2.0.0'
|
284
|
+
implementation platform('com.google.firebase:firebase-bom:26.4.0')
|
285
|
+
implementation 'com.google.firebase:firebase-messaging:'
|
286
|
+
implementation 'com.google.firebase:firebase-analytics'
|
287
|
+
implementation 'com.google.firebase:firebase-core'
|
288
|
+
implementation 'com.google.firebase:firebase-admin:7.1.0'
|
289
|
+
implementation 'com.google.firebase:firebase-auth:19.2.0'
|
290
|
+
implementation "com.firebaseui:firebase-ui-auth:7.1.1"
|
291
|
+
implementation 'com.google.android.gms:play-services-auth:19.0.0'
|
292
|
+
implementation 'com.github.bumptech.glide:glide:4.4.0'
|
293
|
+
testImplementation 'junit:junit:4.12'
|
294
|
+
androidTestImplementation 'androidx.test:runner:1.1.1'
|
295
|
+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
|
296
|
+
}
|
297
|
+
|
298
|
+
apply plugin: 'com.google.gms.google-services'
|
299
|
+
|
300
|
+
|
301
|
+
```
|
302
|
+
|
281
303
|
### 試したこと
|
282
304
|
|
283
305
|
多数の方法で試してみましたがどうしても解決できません。
|