커뮤니티
포인트
쿠폰
내 강의실
국비 신청 내역
증명서
계정
로그아웃
학습 질문
개발 일지
나의 활동
답변 완료
1-6 에뮬레이터 오류
앱개발 종합반 - 플러터
1주차
북마크
S*e
댓글
7
추천
0
조회수
13
조회수
13
답변 완료

* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.

* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.


안녕하세요

다음과 같은 에러 메세지가 나오면서 에뮬레이터 연결이 끊겼다고 하는데요. xcode 를 다시 실행하려고 해도 안되네요. MaterialApp ( 매치되는 곳이 어딘지 모르겠어요. 몇 군데 닫아보았는데 여전히 안되고요.

에러 메세지 2개

: Error: Can't find ')' to match '('.
lib/main.dart:12
    return MaterialApp(
                      ^
Restarted application in 6,276ms.
Lost connection to device.
Exited



: Error: Can't find ')' to match '('.
lib/main.dart:12
    return MaterialApp(
                      ^
Restarted application in 6,276ms.
Lost connection to device.
Exited


작성한 코드

import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        appBar: AppBar(),
        body: Column(
          children: [
            Text(
              "hello flutter",
              style: TextStyle(fontSize: 30, color: Colors.blue
            ),
      ),
            TextField(),
          ],
        ),
    );
  }
}

이렇게도 해봤는데 같은 에러 메세지가 나오고요

import 'package:flutter/material.dart';


void main() {
  runApp(MyApp());
}


class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);


  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        debugShowCheckedModeBanner: false,
        home: Scaffold(
          appBar: AppBar(),
          body: Column(
            children: [
              Text(
                "hello flutter",
                style: TextStyle(fontSize: 30, color: Colors.blue),
              ),
              TextField(),
            ],
          ),
        ),
      ),
  }
}






작성한 코드 및 에러 메세지


취소
 공유
취소
댓글 0
댓글 알림
나의얼굴