반응형

Custom Appbar에 넣은 Expanded에서 위의 에러가 발생

상위 위젯에 Stack을 사용해서 발생한 것으로 보임.

암튼 해당 에러가 발생하면 찾아서 지워보자. ㅎㅎ

 

The following assertion was thrown while applying parent data.:
Incorrect use of ParentDataWidget.

 

The ParentDataWidget Expanded(flex: 1) wants to apply ParentData of type FlexParentData to a RenderObject, which has been set up to accept ParentData of incompatible type ParentData.

Usually, this means that the Expanded widget has the wrong ancestor RenderObjectWidget. Typically, Expanded widgets are placed directly inside Flex widgets.
The offending Expanded is currently placed inside a ColoredBox widget.

 

반응형
반응형

환경

 - Visual Studio 2022

 - Visual Studio Code

 - Flutter Version : 2.8.1

 - Dart Version : 2.15.1

 

생성 방법

 1) flutter devices

   -> desktop 환경이 추가되어 있는지 확인

 2) flutter config --enable-windows-desktop (※ desktop 개발환경이 추가 안되어 있을 경우에만)

 3) 프로젝트를 만들고자 하는 폴더로 이동

   -> ex) cd c:\project

 4) flutter create --platforms=windows "프로젝트명"

   -> ex) flutter create --platforms=windows hello_flutter

 5) c:\project 폴더에 hello_flutter 프로젝트가 생김

   -> 생성된 폴더 : c:\project\hello_flutter

 6) 프로젝트 폴더로 이동 : cd hello_flutter

 7) flutter run -d windows : 프로젝트 디버깅 시작(프로젝트 만들고 한번 실행해보는 것이 좋음)

 

지원 디바이스 추가

 1) flutter create --platforms=windows .

반응형
반응형

Visual Studio 2022 설치 기반에서 Flutter Desktop 개발

2019에서도 아래와 같은 에러가 발생하는지는 알 수 없음

 

Can't load AOT data from C:\프로젝트경로\build\windows\runner\Debug\data\app.so; no such file.
Unable to start engine without AOT data.
Failed to create view controller.
Error waiting for a debug connection: The log reader stopped unexpectedly, or never started.
Error launching application on Windows.

 

해결방법

프로젝트 폴더의 \build\windows 경로에 가보면 app.so 파일이있음
이 파일(app.so)을 \build\windows\runner\Debug\data 여기로 복사 해주면 정상 동작함

 

급하게 문제를 해결해야해서 기록차원에서 남겨둠

반응형
반응형

1. Flutter Select Device

   -> 에뮬레이터 선택

반응형
반응형

1) Ctrl+P

   -> 파일검색

2) Ctrl+Shift+P

   -> 명령어 검색

3) Ctrl+,

   -> 설정화면

4) Ctrl+`

   -> 터미널창 활성화, ` 1번키 왼쪽에 있는 키

반응형
반응형

1) flutter pub add "패키지명"

   -> ex : flutter pub add get

       (getx 패키지 추가 명령어)

2) flutter pub get

   -> pubspec.yaml에 추가한 패키지 설치하는 명령어

3) flutter doctor

   -> flutter 개발환경에 대한 상태를 확인할 수 있음

4) flutter clean

   -> 뭔가 이상하다 싶으면 한번씩(?)

5) flutter devices

   -> 개발가능한 디바이스 리스트 (ex:android, windows...)

6) flutter --version

   -> 버전 확인, dart 버전 확인은 "dart --version"

7) flutter doctor --android-licenses

   -> flutter doctor 했는데 Android toolchain 에러발생했을 때 사용

8) flutter upgrade

   -> flutter를 업그레이드 함

반응형
반응형

Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01

...

프로젝트의 android/build.gradle 파일 수정 (2022/02/18 기준)

classpath 'com.android.tools.build:gradle:7.0.2'

 

프로젝트의 gradle-wrapper.properties 파일 수정(2022/02/18기준)

distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip

반응형
반응형

※ console(cmd) Windows Terminal기반, VS Code 사용

1. 프로젝트 만들 폴더로 이동

2. flutter create --org "서비스명으로 사용할 이름" --platforms "지원할 플랫폼" "프로젝트명

   -> ex : flutter create --org com.blahblah.com --platforms android,ios test_project

3. 만들어진 프로젝트 폴더로 이동

   -> ex : cd test_project

4. VS Code로 프로젝트 실행 : code . (쩜까지 쳐야 함)

 

아직 외우지를 못해서 정리 차원에서 올려놓음

반응형
반응형

Process[] processes = null;

string strCurrentProcess = Process.GetCurrentProcess().ProcessName.ToUpper();

processes = Process.GetProcessesByName(strCurrentProcess);

if (processes.Length > 1)

{

         MessageBox.Show(string.Format("'{0}' 프로그램이 이미 실행 중입니다.", rocess.GetCurrentProcess().ProcessName));

         return;

}

반응형
반응형

냉무

반응형

'개인공간 > 부릉부릉' 카테고리의 다른 글

[틴팅] 루마 vs 레인보우  (0) 2020.07.19
[타이어] 사이즈  (3) 2016.06.12
[소모품] 교체시기, 교환주기  (0) 2016.03.21

+ Recent posts