回答編集履歴
2
bityousei
answer
CHANGED
@@ -16,7 +16,8 @@
|
|
16
16
|
|
17
17
|
FileNotFoundExceptionに変更。
|
18
18
|
|
19
|
-
|
19
|
+
app/build.gradle
|
20
|
+
```build.gradle
|
20
21
|
if (flutterRoot == null) {
|
21
22
|
//throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
|
22
23
|
↓
|
@@ -24,8 +25,8 @@
|
|
24
25
|
}
|
25
26
|
```
|
26
27
|
|
27
|
-
|
28
|
-
|
28
|
+
app/build.gradle
|
29
|
+
```build.gradle
|
29
30
|
android {
|
30
31
|
compileSdkVersion 29 //←この数字を覚える。
|
31
32
|
|
@@ -43,6 +44,8 @@
|
|
43
44
|
}
|
44
45
|
```
|
45
46
|
|
47
|
+
|
48
|
+
|
46
49
|
ファイル→プロジェクト構造
|
47
50
|
|
48
51
|
プロジェクトSDKを先ほどのバージョンと揃える。
|
1
詳細の追記
answer
CHANGED
@@ -7,4 +7,49 @@
|
|
7
7
|
GradleException:
|
8
8
|
[Android Studioで作成したFlutterプロジェクトがGradleまわりのErrorを吐いたので解決する](https://shn-hsn.hatenablog.com/entry/2020/01/02/162242)
|
9
9
|
|
10
|
-
(質問文にエラーが出ているファイル名とエラー文があると回答がつきやすいかもしれないですね!)
|
10
|
+
(質問文にエラーが出ているファイル名とエラー文があると回答がつきやすいかもしれないですね!)
|
11
|
+
|
12
|
+
|
13
|
+
--追記---------------------------------------------
|
14
|
+
|
15
|
+
もう少し詳しく書いてみます。
|
16
|
+
|
17
|
+
FileNotFoundExceptionに変更。
|
18
|
+
|
19
|
+
```app/build.gradle
|
20
|
+
if (flutterRoot == null) {
|
21
|
+
//throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
|
22
|
+
↓
|
23
|
+
throw new FileNotFoundException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
|
24
|
+
}
|
25
|
+
```
|
26
|
+
|
27
|
+
|
28
|
+
```app/build.gradle
|
29
|
+
android {
|
30
|
+
compileSdkVersion 29 //←この数字を覚える。
|
31
|
+
|
32
|
+
sourceSets {
|
33
|
+
main.java.srcDirs += 'src/main/kotlin'
|
34
|
+
}
|
35
|
+
|
36
|
+
defaultConfig {
|
37
|
+
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
38
|
+
applicationId "com.example.untitled1"
|
39
|
+
minSdkVersion 16
|
40
|
+
targetSdkVersion 29 //←この数字を覚える。
|
41
|
+
versionCode flutterVersionCode.toInteger()
|
42
|
+
versionName flutterVersionName
|
43
|
+
}
|
44
|
+
```
|
45
|
+
|
46
|
+
ファイル→プロジェクト構造
|
47
|
+
|
48
|
+
プロジェクトSDKを先ほどのバージョンと揃える。
|
49
|
+

|
50
|
+
|
51
|
+
モジュールSDKを先ほどのバージョンと揃える。
|
52
|
+

|
53
|
+
|
54
|
+
こちらでいかがでしょうか!
|
55
|
+
これでも無理な場合は申し訳ないですがわかりません。
|