커뮤니티
포인트
쿠폰
내 강의실
국비 신청 내역
증명서
계정
로그아웃
학습 질문
개발 일지
나의 활동
답변 완료
프로젝트 신규 생성 - main.dart 파일 복붙 후 실행 오류 발생
[왕초보] 플러터(Flutter)로 시작하는 앱개발 종합반 v0
3주차
북마크
박*한
댓글
3
추천
0
조회수
11
조회수
11
답변 완료

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

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


vscode 실행 시 오류 발생(디버깅 없이 실행)



소스는 자료에 있는것 복붙


import 'package:flutter/cupertino.dart';

import 'package:flutter/material.dart';


void main() {

  runApp(const MyApp());

}


class MyApp extends StatelessWidget {

  const MyApp({super.key});


  @override

  Widget build(BuildContext context) {

    return MaterialApp(

      debugShowCheckedModeBanner: false,

      home: HomePage(),

    );

  }

}


// 홈 페이지

class HomePage extends StatelessWidget {

  const HomePage({super.key});


  @override

  Widget build(BuildContext context) {

    return Scaffold(

      appBar: AppBar(

        title: Text("mymemo"),

      ),

      body: Center(child: Text("메모를 작성해주세요")),

      floatingActionButton: FloatingActionButton(

        child: Icon(Icons.add),

        onPressed: () {

          // + 버튼 클릭시 메모 생성 및 수정 페이지로 이동

          Navigator.push(

            context,

            MaterialPageRoute(builder: (_) => DetailPage()),

          );

        },

      ),

    );

  }

}


// 메모 생성 및 수정 페이지

class DetailPage extends StatelessWidget {

  DetailPage({super.key});


  TextEditingController contentController = TextEditingController();


  @override

  Widget build(BuildContext context) {

    return Scaffold(

      appBar: AppBar(

        actions: [

          IconButton(

            onPressed: () {

              // 삭제 버튼 클릭시

            },

            icon: Icon(Icons.delete),

          )

        ],

      ),

      body: Padding(

        padding: const EdgeInsets.all(16),

        child: TextField(

          controller: contentController,

          decoration: InputDecoration(

            hintText: "메모를 입력하세요",

            border: InputBorder.none,

          ),

          autofocus: true,

          maxLines: null,

          expands: true,

          keyboardType: TextInputType.multiline,

          onChanged: (value) {

            // 텍스트필드 안의 값이 변할 때

          },

        ),

      ),

    );

  }

}







작성한 코드 및 에러 메세지

Launching lib\main.dart on sdk gphone x86 64 in debug mode...

Picked up JAVA_TOOL_OPTIONS: -Djava.net.preferIPv4Stack=true

Picked up _JAVA_OPTIONS: -Xms512M


FAILURE: Build failed with an exception.


* Where:

Build file 'D:\SPARTA_CODING\flutter\3����\����_3week\mymemo\android\app\build.gradle' line: 24


* What went wrong:

A problem occurred evaluating project ':app'.

> Failed to apply plugin 'com.android.internal.application'.

  > Your project path contains non-ASCII characters. This will most likely cause the build to fail on Windows. Please move your project to a different directory. See http://b.android.com/95744 for details. This warning can be disabled by adding the line 'android.overridePathCheck=true' to gradle.properties file in the project directory.


* Try:

> Run with --stacktrace option to get the stack trace.

> Run with --info or --debug option to get more log output.

> Run with --scan to get full insights.


* Get more help at https://help.gradle.org

BUILD FAILED in 31s

Exception: Gradle task assembleDebug failed with exit code 1

Exited (sigterm)



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