* 발생 에러

Android Gradle plugin requires java 11 to run. you ar currently using java 1.8

 

* 해결(window)

다른 분이 올리신 해결방법으로 해결되지 않았는데, 에러 메시지를 잘 읽어보니 Android studio를 업데이트하라고 적혀있었다. Android Studio를 다시 다운받았더니 바로 해결됐다.

 

 

 

728x90

'Frontend > Flutter' 카테고리의 다른 글

Flutter Flexible 적용  (0) 2022.06.28
Hot reload was rejected: Const class cannot become non-const  (0) 2022.06.28
Invalid module name 에러  (0) 2022.06.28

코드

return Scaffold(
      appBar: AppBar(
        title: new Text('Flutter is Gooood'),
        backgroundColor: Color.fromARGB(255, 255, 255, 255),
        leading: Icon(Icons.bar_chart_sharp, color: Colors.black),
      ),
      body: Column(
        children: [
          /* 빨간 area */
          Flexible(
            flex: 1,
            child: Container(
              color: Colors.red,
            ),
          ),
          /* 노랑 + 초록 + 연두 area */
          Flexible(
            flex: 4,
            child: Column(children: [
              /* 노랑 area */
              Flexible(
                flex: 5,
                child: Container(
                  color: Colors.yellow,
                ),
              ),
              /* 초록 + 연두 area */
              Flexible(
                flex: 2,
                child: Row(children: [
                  /* 초록 area */
                  Flexible(
                    flex: 2,
                    child: Container(
                      color: Colors.green,
                    ),
                  ),
                  /* 연두 area */
                  Flexible(
                    flex: 1,
                    child: Container(
                      color: Colors.lightGreen,
                    ),
                  ),
                ],)
              ),
            ]),
          ),
          /* 파란 area */
          Flexible(
            flex: 1,
            child: Container(
            color: Colors.blue,
            ),
          ),
        ],
      ),
    );

 

결과

body 부분

728x90

const class 인 상태에서 non const class로 바뀌면 hot reload가 되지 않는다.

 

앱을 껐다가 다시 실행하면 된다.

728x90

'Frontend > Flutter' 카테고리의 다른 글

Flutter : Android Gradle plugin requires java 11 to run. 에러  (0) 2022.06.29
Flutter Flexible 적용  (0) 2022.06.28
Invalid module name 에러  (0) 2022.06.28

Dart 패키지의 이름은 소문자와 _ (언더바)만 가능하다. 

 

소문자와 언더바를 제외한 다른 문자는 들어가면 안된다.

728x90

+ Recent posts